mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 23:41:17 -05:00
notify-api-784 remove simulated numbers
This commit is contained in:
@@ -122,7 +122,9 @@ def extract_phones(job):
|
|||||||
current_app.logger.info(f"LENGTH OF ROW IS {len(row)}")
|
current_app.logger.info(f"LENGTH OF ROW IS {len(row)}")
|
||||||
if phone_index >= len(row):
|
if phone_index >= len(row):
|
||||||
phones[job_row] = "Error: can't retrieve phone number"
|
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:
|
else:
|
||||||
my_phone = row[phone_index]
|
my_phone = row[phone_index]
|
||||||
my_phone = re.sub(r"[\+\s\(\)\-\.]*", "", my_phone)
|
my_phone = re.sub(r"[\+\s\(\)\-\.]*", "", my_phone)
|
||||||
|
|||||||
@@ -283,7 +283,8 @@ class Config(object):
|
|||||||
"simulate-delivered-2@notifications.service.gov.uk",
|
"simulate-delivered-2@notifications.service.gov.uk",
|
||||||
"simulate-delivered-3@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
|
FREE_SMS_TIER_FRAGMENT_COUNT = 250000
|
||||||
|
|
||||||
|
|||||||
@@ -254,9 +254,8 @@ def test_send_notification_to_queue_throws_exception_deletes_notification(
|
|||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"to_address, notification_type, expected",
|
"to_address, notification_type, expected",
|
||||||
[
|
[
|
||||||
("+12028675000", "sms", True),
|
("+14254147755", "sms", True),
|
||||||
("+12028675111", "sms", True),
|
("+14254147167", "sms", True),
|
||||||
("+12028675222", "sms", True),
|
|
||||||
("2028675000", "sms", True),
|
("2028675000", "sms", True),
|
||||||
("2028675111", "sms", True),
|
("2028675111", "sms", True),
|
||||||
("simulate-delivered@notifications.service.gov.uk", "email", True),
|
("simulate-delivered@notifications.service.gov.uk", "email", True),
|
||||||
|
|||||||
Reference in New Issue
Block a user