mirror of
https://github.com/GSA/notifications-api.git
synced 2026-06-29 11:49:22 -04:00
Mark a declined message from Firetext as permanent-failure rather than failed.
This commit is contained in:
@@ -21,7 +21,7 @@ firetext_responses = {
|
||||
"message": 'Declined',
|
||||
"success": False,
|
||||
"notification_statistics_status": STATISTICS_FAILURE,
|
||||
"notification_status": 'failed'
|
||||
"notification_status": 'permanent-failure'
|
||||
},
|
||||
'2': {
|
||||
"message": 'Undelivered (Pending with Network)',
|
||||
|
||||
@@ -14,7 +14,7 @@ def test_should_return_correct_details_for_delivery():
|
||||
def test_should_return_correct_details_for_bounced():
|
||||
response_dict = get_firetext_responses('1')
|
||||
assert response_dict['message'] == 'Declined'
|
||||
assert response_dict['notification_status'] == 'failed'
|
||||
assert response_dict['notification_status'] == 'permanent-failure'
|
||||
assert response_dict['notification_statistics_status'] == 'failure'
|
||||
assert not response_dict['success']
|
||||
|
||||
|
||||
@@ -1234,7 +1234,7 @@ def test_firetext_callback_should_update_notification_status_failed(notify_api,
|
||||
assert json_resp['message'] == 'Firetext callback succeeded. reference {} updated'.format(
|
||||
sample_notification.id
|
||||
)
|
||||
assert get_notification_by_id(sample_notification.id).status == 'failed'
|
||||
assert get_notification_by_id(sample_notification.id).status == 'permanent-failure'
|
||||
stats = dao_get_notification_statistics_for_service(sample_notification.service_id)[0]
|
||||
assert stats.sms_delivered == 0
|
||||
assert stats.sms_requested == 1
|
||||
|
||||
Reference in New Issue
Block a user