mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 09:51:11 -05:00
Update ses callback to interpret hard and soft bounces.
If the notification has a status == sending then update the status otherwise do not update the status. In other words do not change the status more than once.
This commit is contained in:
@@ -11,10 +11,18 @@ def test_should_return_correct_details_for_delivery():
|
||||
assert response_dict['success']
|
||||
|
||||
|
||||
def test_should_return_correct_details_for_bounced():
|
||||
response_dict = get_aws_responses('Bounce')
|
||||
assert response_dict['message'] == 'Bounced'
|
||||
assert response_dict['notification_status'] == 'failed'
|
||||
def test_should_return_correct_details_for_hard_bounced():
|
||||
response_dict = get_aws_responses('Permanent')
|
||||
assert response_dict['message'] == 'Hard bounced'
|
||||
assert response_dict['notification_status'] == 'permanent-failure'
|
||||
assert response_dict['notification_statistics_status'] == 'failure'
|
||||
assert not response_dict['success']
|
||||
|
||||
|
||||
def test_should_return_correct_details_for_soft_bounced():
|
||||
response_dict = get_aws_responses('Temporary')
|
||||
assert response_dict['message'] == 'Soft bounced'
|
||||
assert response_dict['notification_status'] == 'temporary-failure'
|
||||
assert response_dict['notification_statistics_status'] == 'failure'
|
||||
assert not response_dict['success']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user