log access attempts in access decorator

This commit is contained in:
dandds
2019-03-21 07:23:49 -04:00
parent 4a0dd2d432
commit dff72422f0
4 changed files with 91 additions and 29 deletions

View File

@@ -14,6 +14,7 @@ from atst.domain.authnid.crl import (
)
from tests.mocks import FIXTURE_EMAIL_ADDRESS, DOD_CN
from tests.utils import FakeLogger
class MockX509Store:
@@ -119,20 +120,6 @@ def test_multistep_certificate_chain():
assert cache.crl_check(cert)
class FakeLogger:
def __init__(self):
self.messages = []
def info(self, msg):
self.messages.append(msg)
def warning(self, msg):
self.messages.append(msg)
def error(self, msg):
self.messages.append(msg)
def test_no_op_crl_cache_logs_common_name():
logger = FakeLogger()
cert = open("ssl/client-certs/atat.mil.crt", "rb").read()