mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 18:01:08 -05:00
test tweaks
This commit is contained in:
@@ -18,10 +18,11 @@ from sqlalchemy.orm.exc import NoResultFound
|
|||||||
|
|
||||||
from app.serialised_models import SerialisedService
|
from app.serialised_models import SerialisedService
|
||||||
|
|
||||||
GENERAL_TOKEN_ERROR_MESSAGE = '''
|
# stvnrlly - this is silly, but bandit has a multiline string bug (https://github.com/PyCQA/bandit/issues/658)
|
||||||
Invalid token: make sure your API token matches the example
|
# and flake8 wants a multiline quote here. TODO: check on bug status and restore sanity once possible
|
||||||
at https://docs.notifications.service.gov.uk/rest-api.html#authorisation-header
|
TOKEN_MESSAGE_ONE = "Invalid token: make sure your API token matches the example " # nosec B105
|
||||||
''' # nosec B105
|
TOKEN_MESSAGE_TWO = "at https://docs.notifications.service.gov.uk/rest-api.html#authorisation-header" # nosec B105
|
||||||
|
GENERAL_TOKEN_ERROR_MESSAGE = TOKEN_MESSAGE_ONE + TOKEN_MESSAGE_TWO
|
||||||
|
|
||||||
AUTH_DB_CONNECTION_DURATION_SECONDS = Histogram(
|
AUTH_DB_CONNECTION_DURATION_SECONDS = Histogram(
|
||||||
'auth_db_connection_duration_seconds',
|
'auth_db_connection_duration_seconds',
|
||||||
|
|||||||
@@ -198,7 +198,8 @@ def test_ses_callback_should_log_if_notification_is_missing(client, _notify_db,
|
|||||||
assert process_ses_results(ses_notification_callback(reference='ref')) is None
|
assert process_ses_results(ses_notification_callback(reference='ref')) is None
|
||||||
assert mock_retry.call_count == 0
|
assert mock_retry.call_count == 0
|
||||||
mock_logger.assert_called_once_with(
|
mock_logger.assert_called_once_with(
|
||||||
'notification not found for reference: ref (while attempting update to delivered)'
|
'notification not found for reference: ref (while \
|
||||||
|
attempting update to delivered)'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user