mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-22 16:31:15 -05:00
Fix tests
This commit is contained in:
committed by
Richard Chapman
parent
644b31ba75
commit
263131f6ba
@@ -133,9 +133,9 @@ def test_ses_callback_should_update_multiple_notification_status_sent(
|
|||||||
sent_at=datetime.utcnow(),
|
sent_at=datetime.utcnow(),
|
||||||
status='sending')
|
status='sending')
|
||||||
|
|
||||||
resp1 = process_ses_response(json.loads(data=ses_notification_callback(ref='ref1')))
|
resp1 = process_ses_response(json.loads(ses_notification_callback(ref='ref1')))
|
||||||
resp2 = process_ses_response(json.loads(data=ses_notification_callback(ref='ref2')))
|
resp2 = process_ses_response(json.loads(ses_notification_callback(ref='ref2')))
|
||||||
resp3 = process_ses_response(json.loads(data=ses_notification_callback(ref='ref3')))
|
resp3 = process_ses_response(json.loads(ses_notification_callback(ref='ref3')))
|
||||||
|
|
||||||
assert resp1[1] == 200
|
assert resp1[1] == 200
|
||||||
assert resp2[1] == 200
|
assert resp2[1] == 200
|
||||||
@@ -167,7 +167,7 @@ def test_ses_callback_should_set_status_to_temporary_failure(client,
|
|||||||
)
|
)
|
||||||
assert get_notification_by_id(notification.id).status == 'sending'
|
assert get_notification_by_id(notification.id).status == 'sending'
|
||||||
|
|
||||||
_, status, res = process_ses_response(json.loads(data=ses_soft_bounce_callback()))
|
_, status, res = process_ses_response(json.loads(ses_soft_bounce_callback()))
|
||||||
assert status == 200
|
assert status == 200
|
||||||
assert res['result'] == 'success'
|
assert res['result'] == 'success'
|
||||||
assert res['message'] == 'SES callback succeeded'
|
assert res['message'] == 'SES callback succeeded'
|
||||||
@@ -195,7 +195,7 @@ def test_ses_callback_should_not_set_status_once_status_is_delivered(client,
|
|||||||
|
|
||||||
assert get_notification_by_id(notification.id).status == 'delivered'
|
assert get_notification_by_id(notification.id).status == 'delivered'
|
||||||
|
|
||||||
error, status, _ = process_ses_response(json.loads(data=ses_soft_bounce_callback()))
|
error, status, _ = process_ses_response(json.loads(ses_soft_bounce_callback()))
|
||||||
assert status == 404
|
assert status == 404
|
||||||
assert error == 'SES callback failed: notification either not found or already updated from sending. Status temporary-failure for notification reference ref' # noqa
|
assert error == 'SES callback failed: notification either not found or already updated from sending. Status temporary-failure for notification reference ref' # noqa
|
||||||
assert get_notification_by_id(notification.id).status == 'delivered'
|
assert get_notification_by_id(notification.id).status == 'delivered'
|
||||||
@@ -222,7 +222,7 @@ def test_ses_callback_should_set_status_to_permanent_failure(client,
|
|||||||
|
|
||||||
assert get_notification_by_id(notification.id).status == 'sending'
|
assert get_notification_by_id(notification.id).status == 'sending'
|
||||||
|
|
||||||
_, status, res = process_ses_response(json.loads(data=ses_hard_bounce_callback()))
|
_, status, res = process_ses_response(json.loads(ses_hard_bounce_callback()))
|
||||||
assert status == 200
|
assert status == 200
|
||||||
assert res['result'] == 'success'
|
assert res['result'] == 'success'
|
||||||
assert res['message'] == 'SES callback succeeded'
|
assert res['message'] == 'SES callback succeeded'
|
||||||
|
|||||||
Reference in New Issue
Block a user