This commit is contained in:
Kenneth Kehl
2025-04-03 08:16:33 -07:00
parent e9ea22ad6d
commit 28444a460b
2 changed files with 2 additions and 1 deletions

View File

@@ -50,6 +50,7 @@ class AwsSnsClient(SmsClient):
matched = False matched = False
if "+" not in to: if "+" not in to:
to = f"+{to}" to = f"+{to}"
for match in phonenumbers.PhoneNumberMatcher(to, None): for match in phonenumbers.PhoneNumberMatcher(to, None):
matched = True matched = True
to = phonenumbers.format_number( to = phonenumbers.format_number(

View File

@@ -5,7 +5,7 @@ from app import aws_sns_client
def test_send_sms_successful_returns_aws_sns_response(notify_api, mocker): def test_send_sms_successful_returns_aws_sns_response(notify_api, mocker):
boto_mock = mocker.patch.object(aws_sns_client, "_client", create=True) boto_mock = mocker.patch.object(aws_sns_client, "_client", create=True)
to = "6135555555" to = "16135555555"
content = reference = "foo" content = reference = "foo"
with notify_api.app_context(): with notify_api.app_context():
aws_sns_client.send_sms(to, content, reference) aws_sns_client.send_sms(to, content, reference)