mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 23:41:17 -05:00
Update mmg status code 2 to be a permanent failure.
This commit is contained in:
@@ -6,10 +6,10 @@ from app.clients.sms import (SmsClient, SmsClientException)
|
||||
|
||||
mmg_response_map = {
|
||||
'2': {
|
||||
"message": ' Temporary failure',
|
||||
"message": ' Permanent failure',
|
||||
"notification_statistics_status": STATISTICS_FAILURE,
|
||||
"success": False,
|
||||
"notification_status": 'temporary-failure'
|
||||
"notification_status": 'permanent-failure'
|
||||
},
|
||||
'3': {
|
||||
"message": 'Delivered',
|
||||
|
||||
@@ -297,7 +297,7 @@ def test_process_mmg_response_status_5_updates_notification_with_permanently_fai
|
||||
assert get_notification_by_id(sample_notification.id).status == 'permanent-failure'
|
||||
|
||||
|
||||
def test_process_mmg_response_status_2_updates_notification_with_temporary_failed(notify_api,
|
||||
def test_process_mmg_response_status_2_updates_notification_with_permanently_failed(notify_api,
|
||||
sample_notification):
|
||||
with notify_api.test_client() as client:
|
||||
data = json.dumps({"reference": "mmg_reference",
|
||||
@@ -312,7 +312,7 @@ def test_process_mmg_response_status_2_updates_notification_with_temporary_faile
|
||||
json_data = json.loads(response.data)
|
||||
assert json_data['result'] == 'success'
|
||||
assert json_data['message'] == 'MMG callback succeeded. reference {} updated'.format(sample_notification.id)
|
||||
assert get_notification_by_id(sample_notification.id).status == 'temporary-failure'
|
||||
assert get_notification_by_id(sample_notification.id).status == 'permanent-failure'
|
||||
|
||||
|
||||
def test_process_mmg_response_status_4_updates_notification_with_temporary_failed(notify_api,
|
||||
|
||||
Reference in New Issue
Block a user