mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-22 08:21:13 -05:00
@@ -21,7 +21,9 @@ from tests.app.db import (
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("notification_type", [NotificationType.EMAIL, NotificationType.SMS])
|
||||
@pytest.mark.parametrize(
|
||||
"notification_type", [NotificationType.EMAIL, NotificationType.SMS]
|
||||
)
|
||||
def test_send_delivery_status_to_service_post_https_request_to_service_with_encrypted_data(
|
||||
notify_db_session, notification_type
|
||||
):
|
||||
@@ -103,7 +105,10 @@ def test_send_complaint_to_service_posts_https_request_to_service_with_encrypted
|
||||
] == "Bearer {}".format(callback_api.bearer_token)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("notification_type", [NotificationType.EMAIL, NotificationType.SMS],)
|
||||
@pytest.mark.parametrize(
|
||||
"notification_type",
|
||||
[NotificationType.EMAIL, NotificationType.SMS],
|
||||
)
|
||||
@pytest.mark.parametrize("status_code", [429, 500, 503])
|
||||
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
|
||||
@@ -131,7 +136,10 @@ def test__send_data_to_service_callback_api_retries_if_request_returns_error_cod
|
||||
assert mocked.call_args[1]["queue"] == "service-callbacks-retry"
|
||||
|
||||
|
||||
@pytest.mark.parametrize("notification_type", [NotificationType.EMAIL, NotificationType.SMS],)
|
||||
@pytest.mark.parametrize(
|
||||
"notification_type",
|
||||
[NotificationType.EMAIL, NotificationType.SMS],
|
||||
)
|
||||
def test__send_data_to_service_callback_api_does_not_retry_if_request_returns_404_with_encrypted_data(
|
||||
notify_db_session, mocker, notification_type
|
||||
):
|
||||
@@ -160,7 +168,10 @@ def test__send_data_to_service_callback_api_does_not_retry_if_request_returns_40
|
||||
def test_send_delivery_status_to_service_succeeds_if_sent_at_is_none(
|
||||
notify_db_session, mocker
|
||||
):
|
||||
callback_api, template = _set_up_test_data(NotificationType.EMAIL, CallbackType.DELIVERY_STATUS,)
|
||||
callback_api, template = _set_up_test_data(
|
||||
NotificationType.EMAIL,
|
||||
CallbackType.DELIVERY_STATUS,
|
||||
)
|
||||
datestr = datetime(2017, 6, 20)
|
||||
notification = create_notification(
|
||||
template=template,
|
||||
|
||||
Reference in New Issue
Block a user