diff --git a/app/clients/sms/aws_sns.py b/app/clients/sms/aws_sns.py index a841f1c2a..171080330 100644 --- a/app/clients/sms/aws_sns.py +++ b/app/clients/sms/aws_sns.py @@ -50,6 +50,7 @@ class AwsSnsClient(SmsClient): matched = False if "+" not in to: to = f"+{to}" + for match in phonenumbers.PhoneNumberMatcher(to, None): matched = True to = phonenumbers.format_number( diff --git a/tests/app/clients/test_aws_sns.py b/tests/app/clients/test_aws_sns.py index 1ebfa3e58..09c623f18 100644 --- a/tests/app/clients/test_aws_sns.py +++ b/tests/app/clients/test_aws_sns.py @@ -5,7 +5,7 @@ from app import aws_sns_client def test_send_sms_successful_returns_aws_sns_response(notify_api, mocker): boto_mock = mocker.patch.object(aws_sns_client, "_client", create=True) - to = "6135555555" + to = "16135555555" content = reference = "foo" with notify_api.app_context(): aws_sns_client.send_sms(to, content, reference)