mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-22 16:31:15 -05:00
Cleaning up "email" from code.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
This commit is contained in:
@@ -64,14 +64,14 @@ def test_send_delivery_status_to_service_post_https_request_to_service_with_encr
|
||||
assert request_mock.request_history[0].headers["Content-type"] == "application/json"
|
||||
assert request_mock.request_history[0].headers[
|
||||
"Authorization"
|
||||
] == "Bearer {}".format(callback_api.bearer_token)
|
||||
] == f"Bearer {callback_api.bearer_token}"
|
||||
|
||||
|
||||
def test_send_complaint_to_service_posts_https_request_to_service_with_encrypted_data(
|
||||
notify_db_session,
|
||||
):
|
||||
with freeze_time("2001-01-01T12:00:00"):
|
||||
callback_api, template = _set_up_test_data("email", "complaint")
|
||||
callback_api, template = _set_up_test_data(NotificationType.EMAIL, CallbackType.COMPLAINT,)
|
||||
|
||||
notification = create_notification(template=template)
|
||||
complaint = create_complaint(
|
||||
@@ -102,7 +102,7 @@ def test_send_complaint_to_service_posts_https_request_to_service_with_encrypted
|
||||
)
|
||||
assert request_mock.request_history[0].headers[
|
||||
"Authorization"
|
||||
] == "Bearer {}".format(callback_api.bearer_token)
|
||||
] == f"Bearer {callback_api.bearer_token}"
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@@ -113,7 +113,7 @@ def test_send_complaint_to_service_posts_https_request_to_service_with_encrypted
|
||||
def test__send_data_to_service_callback_api_retries_if_request_returns_error_code_with_encrypted_data(
|
||||
notify_db_session, mocker, notification_type, status_code
|
||||
):
|
||||
callback_api, template = _set_up_test_data(notification_type, "delivery_status")
|
||||
callback_api, template = _set_up_test_data(notification_type, CallbackType.DELIVERY_STATUS,)
|
||||
datestr = datetime(2017, 6, 20)
|
||||
notification = create_notification(
|
||||
template=template,
|
||||
@@ -143,7 +143,7 @@ def test__send_data_to_service_callback_api_retries_if_request_returns_error_cod
|
||||
def test__send_data_to_service_callback_api_does_not_retry_if_request_returns_404_with_encrypted_data(
|
||||
notify_db_session, mocker, notification_type
|
||||
):
|
||||
callback_api, template = _set_up_test_data(notification_type, "delivery_status")
|
||||
callback_api, template = _set_up_test_data(notification_type, CallbackType.DELIVERY_STATUS,)
|
||||
datestr = datetime(2017, 6, 20)
|
||||
notification = create_notification(
|
||||
template=template,
|
||||
@@ -178,7 +178,7 @@ def test_send_delivery_status_to_service_succeeds_if_sent_at_is_none(
|
||||
created_at=datestr,
|
||||
updated_at=datestr,
|
||||
sent_at=None,
|
||||
status="technical-failure",
|
||||
status=NotificationStatus.TECHNICAL_FAILURE,
|
||||
)
|
||||
encrypted_data = _set_up_data_for_status_update(callback_api, notification)
|
||||
mocked = mocker.patch(
|
||||
|
||||
Reference in New Issue
Block a user