From a028be238b37cbe2f6f7d323ab8bc6e4e4898177 Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Thu, 1 Feb 2024 10:48:59 -0800 Subject: [PATCH] notify-api-784 remove simulated numbers --- app/aws/s3.py | 4 +++- app/config.py | 3 ++- tests/app/notifications/test_process_notification.py | 5 ++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/aws/s3.py b/app/aws/s3.py index 13879bf6f..7ddf9828e 100644 --- a/app/aws/s3.py +++ b/app/aws/s3.py @@ -122,7 +122,9 @@ def extract_phones(job): current_app.logger.info(f"LENGTH OF ROW IS {len(row)}") if phone_index >= len(row): phones[job_row] = "Error: can't retrieve phone number" - current_app.logger.error("Corrupt csv file, missing columns job_id {job_id} service_id {service_id}") + current_app.logger.error( + "Corrupt csv file, missing columns job_id {job_id} service_id {service_id}" + ) else: my_phone = row[phone_index] my_phone = re.sub(r"[\+\s\(\)\-\.]*", "", my_phone) diff --git a/app/config.py b/app/config.py index 49cbd89c0..b4a5b8aed 100644 --- a/app/config.py +++ b/app/config.py @@ -283,7 +283,8 @@ class Config(object): "simulate-delivered-2@notifications.service.gov.uk", "simulate-delivered-3@notifications.service.gov.uk", ) - SIMULATED_SMS_NUMBERS = ("+12028675000", "+12028675111", "+12028675222") + # 7755 is success, 7167 is failure + SIMULATED_SMS_NUMBERS = ("+14254147755", "+14254147167") FREE_SMS_TIER_FRAGMENT_COUNT = 250000 diff --git a/tests/app/notifications/test_process_notification.py b/tests/app/notifications/test_process_notification.py index 87c8da988..bbde98da2 100644 --- a/tests/app/notifications/test_process_notification.py +++ b/tests/app/notifications/test_process_notification.py @@ -254,9 +254,8 @@ def test_send_notification_to_queue_throws_exception_deletes_notification( @pytest.mark.parametrize( "to_address, notification_type, expected", [ - ("+12028675000", "sms", True), - ("+12028675111", "sms", True), - ("+12028675222", "sms", True), + ("+14254147755", "sms", True), + ("+14254147167", "sms", True), ("2028675000", "sms", True), ("2028675111", "sms", True), ("simulate-delivered@notifications.service.gov.uk", "email", True),