From 53af3ed1269b5591d58ff9d24fe0ec3c0c66a1e2 Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Mon, 7 Jul 2025 12:27:11 -0700 Subject: [PATCH] more tests --- tests/app/clients/test_aws_pinpoint.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/app/clients/test_aws_pinpoint.py b/tests/app/clients/test_aws_pinpoint.py index b6a50c0d7..70ada9426 100644 --- a/tests/app/clients/test_aws_pinpoint.py +++ b/tests/app/clients/test_aws_pinpoint.py @@ -1,5 +1,6 @@ from unittest.mock import MagicMock +import pytest from aiohttp import ClientError from flask import current_app @@ -20,7 +21,7 @@ def test_validate_phone_number_success(): result = client_instance.validate_phone_number("US", "+1234567890") assert result is not None client_instance._client.phone_number_validate.assert_called_once_with( - {"IsoCountryCode": "US", "PhoneNumber": "+1234567890"} + NumberValidateRequest={"IsoCountryCode": "US", "PhoneNumber": "+1234567890"} ) current_app.logger.info.assert_called_once() @@ -33,7 +34,8 @@ def test_validate_phone_number_client_error(): "phone number validate", ) - client_instance.validate_phone_number("US", "bad-number") + with pytest.raises(ClientError): + client_instance.validate_phone_number("US", "bad-number") current_app.logger.exception.assert_called_once_with( "#notify-debug-validate-phone-number Could not validate with pinpoint"