more tests

This commit is contained in:
Kenneth Kehl
2025-07-07 13:38:11 -07:00
parent 71fb38fb51
commit 23961a3e66

View File

@@ -7,20 +7,21 @@ from app.clients.pinpoint.aws_pinpoint import AwsPinpointClient
def test_validate_phone_number_success():
phone = "+1234567890"
mock_response = {
"NumberValidateResponse": {
"PhoneType": "MOBILE",
"CleansedPhoneNumberE164": "+1234567890",
"CleansedPhoneNumberE164": phone,
}
}
client_instance = AwsPinpointClient()
client_instance._client = MagicMock()
client_instance._client.phone_number_validate.return_value = mock_response
result = client_instance.validate_phone_number("US", "+1234567890")
result = client_instance.validate_phone_number("US", phone)
assert result is not None
client_instance._client.phone_number_validate.assert_called_once_with(
NumberValidateRequest={"IsoCountryCode": "US", "PhoneNumber": "+1234567890"}
NumberValidateRequest={"IsoCountryCode": "US", "PhoneNumber": phone}
)