From 636ae42dcc9f9cf7b6f8ad18c8f5d6b49a78ea1a Mon Sep 17 00:00:00 2001 From: Richard Parke Date: Tue, 9 Jul 2024 16:15:26 +0100 Subject: [PATCH 01/14] Refactor our phone validation errors This is necessary, because we changed how InvalidPhoneError class that we pull in from notifications-utils works. Now it's a rich object, so we have to pass it in a bit differently, and it already contains legacy messages for V2 API which we need. --- app/schema_validation/__init__.py | 10 +++++----- app/v2/errors.py | 15 ++++++++------- requirements.in | 2 +- requirements.txt | 2 +- tests/app/v2/test_errors.py | 19 ++++++------------- 5 files changed, 21 insertions(+), 27 deletions(-) diff --git a/app/schema_validation/__init__.py b/app/schema_validation/__init__.py index 21b50145ba..eed8febfac 100644 --- a/app/schema_validation/__init__.py +++ b/app/schema_validation/__init__.py @@ -9,8 +9,6 @@ from notifications_utils.recipient_validation.errors import InvalidEmailError, InvalidPhoneError from notifications_utils.recipient_validation.phone_number import validate_phone_number -from app.notifications.validators import remap_phone_number_validation_messages - format_checker = FormatChecker() @@ -21,13 +19,15 @@ def validate_uuid(instance): return True -@format_checker.checks("phone_number", raises=InvalidPhoneError) +@format_checker.checks("phone_number", raises=ValidationError) def validate_schema_phone_number(instance): if isinstance(instance, str): try: validate_phone_number(instance, international=True) - except InvalidPhoneError as error: - raise InvalidPhoneError(remap_phone_number_validation_messages(str(error))) from error + except InvalidPhoneError as e: + legacy_message = e.get_legacy_v2_api_error_message() + raise ValidationError(legacy_message) from None + # raise e return True diff --git a/app/v2/errors.py b/app/v2/errors.py index 809114aa5a..caadec97f5 100644 --- a/app/v2/errors.py +++ b/app/v2/errors.py @@ -2,7 +2,7 @@ from flask import current_app, jsonify, request from jsonschema import ValidationError as JsonSchemaValidationError -from notifications_utils.recipient_validation.errors import InvalidPhoneError, InvalidRecipientError +from notifications_utils.recipient_validation.errors import InvalidRecipientError from sqlalchemy.exc import DataError from sqlalchemy.orm.exc import NoResultFound @@ -85,14 +85,15 @@ def to_dict_v2(self): def register_errors(blueprint): @blueprint.errorhandler(InvalidRecipientError) def invalid_format(error): - if isinstance(error, InvalidPhoneError): - from app.notifications.validators import remap_phone_number_validation_messages - - error = InvalidPhoneError(remap_phone_number_validation_messages(str(error))) - current_app.logger.info(error) - return jsonify(status_code=400, errors=[{"error": error.__class__.__name__, "message": str(error)}]), 400 + return ( + jsonify( + status_code=400, + errors=[{"error": error.__class__.__name__, "message": error.get_legacy_v2_api_error_message()}], + ), + 400, + ) @blueprint.errorhandler(InvalidRequest) def invalid_data(error): diff --git a/requirements.in b/requirements.in index 46a240848a..1196497c40 100644 --- a/requirements.in +++ b/requirements.in @@ -23,7 +23,7 @@ lxml==4.9.3 notifications-python-client==8.0.1 -notifications-utils @ git+https://github.com/alphagov/notifications-utils.git@80.0.1 +notifications-utils @ git+https://github.com/alphagov/notifications-utils.git@81.1.0 # gds-metrics requires prometheseus 0.2.0, override that requirement as 0.7.1 brings significant performance gains prometheus-client==0.14.1 diff --git a/requirements.txt b/requirements.txt index f4727c7339..a1d4d71e9a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -151,7 +151,7 @@ mistune==0.8.4 # via notifications-utils notifications-python-client==8.0.1 # via -r requirements.in -notifications-utils @ git+https://github.com/alphagov/notifications-utils.git@80.0.1 +notifications-utils @ git+https://github.com/alphagov/notifications-utils.git@81.1.0 # via -r requirements.in ordered-set==4.1.0 # via notifications-utils diff --git a/tests/app/v2/test_errors.py b/tests/app/v2/test_errors.py index cf9913047a..9666d0797b 100644 --- a/tests/app/v2/test_errors.py +++ b/tests/app/v2/test_errors.py @@ -49,14 +49,7 @@ def raising_data_error(): @blue.route("raise_phone_error/", methods=["GET"]) def raising_invalid_phone_error(error_id): - errors = { - "symbol": "Mobile numbers can only include: 0 1 2 3 4 5 6 7 8 9 ( ) + -", - "too-short": "Mobile number is too long", - "too-long": "Mobile number is too short", - "invalid-country": "Country code not found - double check the mobile number you entered", - "invalid-uk": "This does not look like a UK mobile number – double check the mobile number you entered", - } - raise InvalidPhoneError(errors[error_id]) + raise InvalidPhoneError(code=error_id) @blue.route("raise_exception", methods=["GET"]) def raising_exception(): @@ -151,11 +144,11 @@ def test_bad_method(app_for_test): @pytest.mark.parametrize( "error_id, expected_response", ( - ("symbol", "Must not contain letters or symbols"), - ("too-short", "Too many digits"), - ("too-long", "Not enough digits"), - ("invalid-country", "Not a valid country prefix"), - ("invalid-uk", "Not a UK mobile number"), + (InvalidPhoneError.Codes.UNKNOWN_CHARACTER, "Must not contain letters or symbols"), + (InvalidPhoneError.Codes.TOO_LONG, "Too many digits"), + (InvalidPhoneError.Codes.TOO_SHORT, "Not enough digits"), + (InvalidPhoneError.Codes.UNSUPPORTED_COUNTRY_CODE, "Not a valid country prefix"), + (InvalidPhoneError.Codes.NOT_A_UK_MOBILE, "Not a UK mobile number"), ), ) def test_invalid_phone_error(app_for_test, error_id, expected_response): From dda7c86ee389a945379e20fe8368ded0191ef308 Mon Sep 17 00:00:00 2001 From: Pea Tyczynska Date: Thu, 11 Jul 2024 16:45:56 +0100 Subject: [PATCH 02/14] Remove unused translation of new into old error messages That happens inside InvalidPhoneError class in notifications-utils now. --- app/constants.py | 13 ------------- app/notifications/validators.py | 5 ----- app/schemas.py | 10 +++------- 3 files changed, 3 insertions(+), 25 deletions(-) diff --git a/app/constants.py b/app/constants.py index fb547ce263..bc297bf7bd 100644 --- a/app/constants.py +++ b/app/constants.py @@ -330,16 +330,3 @@ class CacheKeys: # Admin API error codes QR_CODE_TOO_LONG = "qr-code-too-long" - - -# We updated the content for phone number validation messages in https://github.com/alphagov/notifications-utils/pull/1054, -# but these are returned from our API. We don't want to make any breaking changes, so we will map them back to our -# original errors. -# We can decide as/when we want to remove this and update the messages to end users. -PHONE_NUMBER_VALIDATION_ERROR_MAP = { - "Mobile numbers can only include: 0 1 2 3 4 5 6 7 8 9 ( ) + -": "Must not contain letters or symbols", - "Mobile number is too long": "Too many digits", - "Mobile number is too short": "Not enough digits", - "Country code not found - double check the mobile number you entered": "Not a valid country prefix", - "This does not look like a UK mobile number – double check the mobile number you entered": "Not a UK mobile number", -} diff --git a/app/notifications/validators.py b/app/notifications/validators.py index d424ebb7b3..857c8ea8f9 100644 --- a/app/notifications/validators.py +++ b/app/notifications/validators.py @@ -21,7 +21,6 @@ KEY_TYPE_TEAM, KEY_TYPE_TEST, LETTER_TYPE, - PHONE_NUMBER_VALIDATION_ERROR_MAP, SMS_TYPE, ) from app.dao.service_email_reply_to_dao import dao_get_reply_to_by_id @@ -277,7 +276,3 @@ def check_template_can_contain_documents(template_type, personalisation): isinstance(v, dict) and "file" in v for v in (personalisation or {}).values() ): raise BadRequestError(message="Can only send a file by email") - - -def remap_phone_number_validation_messages(error_message): - return PHONE_NUMBER_VALIDATION_ERROR_MAP.get(error_message, error_message) diff --git a/app/schemas.py b/app/schemas.py index 8c7a556266..2e8a66a786 100644 --- a/app/schemas.py +++ b/app/schemas.py @@ -25,7 +25,6 @@ from app import db, ma, models from app.dao.permissions_dao import permission_dao from app.models import ServicePermission -from app.notifications.validators import remap_phone_number_validation_messages from app.utils import DATETIME_FORMAT_NO_TIMEZONE, get_template_instance @@ -134,8 +133,7 @@ def validate_mobile_number(self, value): if value is not None: validate_phone_number(value, international=True) except InvalidPhoneError as error: - error_message = remap_phone_number_validation_messages(str(error)) - raise ValidationError(f"Invalid phone number: {error_message}") from error + raise ValidationError(f"Invalid phone number: {error.get_legacy_v2_api_error_message()}") from error class UserUpdateAttributeSchema(BaseSchema): @@ -175,8 +173,7 @@ def validate_mobile_number(self, value): if value is not None: validate_phone_number(value, international=True) except InvalidPhoneError as error: - error_message = remap_phone_number_validation_messages(str(error)) - raise ValidationError(f"Invalid phone number: {error_message}") from error + raise ValidationError(f"Invalid phone number: {error.get_legacy_v2_api_error_message()}") from error @validates_schema(pass_original=True) def check_unknown_fields(self, data, original_data, **kwargs): @@ -578,8 +575,7 @@ def validate_to(self, value): try: validate_phone_number(value, international=True) except InvalidPhoneError as error: - error_message = remap_phone_number_validation_messages(str(error)) - raise ValidationError(f"Invalid phone number: {error_message}") from error + raise ValidationError(f"Invalid phone number: {error.get_legacy_v2_api_error_message()}") from error @post_load def format_phone_number(self, item, **kwargs): From b54e0ca213148bc17f2f86f97e1d786f6df14290 Mon Sep 17 00:00:00 2001 From: Pea Tyczynska Date: Thu, 11 Jul 2024 16:49:49 +0100 Subject: [PATCH 03/14] Remove legacy comment --- app/schema_validation/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/app/schema_validation/__init__.py b/app/schema_validation/__init__.py index eed8febfac..601edf9550 100644 --- a/app/schema_validation/__init__.py +++ b/app/schema_validation/__init__.py @@ -27,7 +27,6 @@ def validate_schema_phone_number(instance): except InvalidPhoneError as e: legacy_message = e.get_legacy_v2_api_error_message() raise ValidationError(legacy_message) from None - # raise e return True From 3a3f9bc9ac470e028b6e4940cdddb7be27835956 Mon Sep 17 00:00:00 2001 From: Pea Tyczynska Date: Thu, 11 Jul 2024 16:59:58 +0100 Subject: [PATCH 04/14] Test for us seeing landlines as valid in our schema --- tests/app/v2/notifications/test_notification_schemas.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/app/v2/notifications/test_notification_schemas.py b/tests/app/v2/notifications/test_notification_schemas.py index d7141a33a3..daa70296b3 100644 --- a/tests/app/v2/notifications/test_notification_schemas.py +++ b/tests/app/v2/notifications/test_notification_schemas.py @@ -120,6 +120,11 @@ def test_post_sms_schema_is_valid(input): assert validate(input, post_sms_request_schema) == input +def test_post_sms_schema_is_valid_for_landline_if_service_can_send_to_landlines(): + sms_data = {"phone_number": "0117 496 0860", "template_id": str(uuid.uuid4())} + assert validate(sms_data, post_sms_request_schema) == sms_data + + @pytest.mark.parametrize( "template_id", [ From 81c5add7fc9b3a1b2873dd5cc49059f059706af4 Mon Sep 17 00:00:00 2001 From: Richard Parke Date: Thu, 11 Jul 2024 17:23:40 +0100 Subject: [PATCH 05/14] WIP adding landline validation for feature flagged services --- app/schema_validation/__init__.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/app/schema_validation/__init__.py b/app/schema_validation/__init__.py index 601edf9550..74e08b1d27 100644 --- a/app/schema_validation/__init__.py +++ b/app/schema_validation/__init__.py @@ -7,7 +7,10 @@ from jsonschema import Draft7Validator, FormatChecker, ValidationError from notifications_utils.recipient_validation.email_address import validate_email_address from notifications_utils.recipient_validation.errors import InvalidEmailError, InvalidPhoneError -from notifications_utils.recipient_validation.phone_number import validate_phone_number +from notifications_utils.recipient_validation.phone_number import PhoneNumber ,validate_phone_number + +from app import authenticated_service +from app.constants import SMS_TO_UK_LANDLINES format_checker = FormatChecker() @@ -20,10 +23,16 @@ def validate_uuid(instance): @format_checker.checks("phone_number", raises=ValidationError) -def validate_schema_phone_number(instance): +def validate_schema_phone_number(instance, can_send_to_landlines = False): + if isinstance(instance, str): try: - validate_phone_number(instance, international=True) + if can_send_to_landlines: + # phonenumber = PhoneNumber(instance, international=True) + # phonenumber.validate_phone_number() + validate_phone_number(instance, international=True) + else: + validate_phone_number(instance, international=True) except InvalidPhoneError as e: legacy_message = e.get_legacy_v2_api_error_message() raise ValidationError(legacy_message) from None From 6f99511f4f13089ba6d7c05ee35f758155428f11 Mon Sep 17 00:00:00 2001 From: Richard Parke Date: Fri, 12 Jul 2024 10:28:31 +0100 Subject: [PATCH 06/14] WIP failing tests --- app/schema_validation/__init__.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/app/schema_validation/__init__.py b/app/schema_validation/__init__.py index 74e08b1d27..a7ab46f86c 100644 --- a/app/schema_validation/__init__.py +++ b/app/schema_validation/__init__.py @@ -7,10 +7,7 @@ from jsonschema import Draft7Validator, FormatChecker, ValidationError from notifications_utils.recipient_validation.email_address import validate_email_address from notifications_utils.recipient_validation.errors import InvalidEmailError, InvalidPhoneError -from notifications_utils.recipient_validation.phone_number import PhoneNumber ,validate_phone_number - -from app import authenticated_service -from app.constants import SMS_TO_UK_LANDLINES +from notifications_utils.recipient_validation.phone_number import PhoneNumber, validate_phone_number format_checker = FormatChecker() @@ -23,14 +20,14 @@ def validate_uuid(instance): @format_checker.checks("phone_number", raises=ValidationError) -def validate_schema_phone_number(instance, can_send_to_landlines = False): +def validate_schema_phone_number(instance, can_send_to_landlines=False): if isinstance(instance, str): try: if can_send_to_landlines: - # phonenumber = PhoneNumber(instance, international=True) - # phonenumber.validate_phone_number() - validate_phone_number(instance, international=True) + phonenumber = PhoneNumber(instance, international=True) + phonenumber.validate_phone_number() + # validate_phone_number(instance, international=True) else: validate_phone_number(instance, international=True) except InvalidPhoneError as e: From e3673bf23f1b910a00fb2b1f1c84a696d910d0c0 Mon Sep 17 00:00:00 2001 From: Richard Parke Date: Mon, 15 Jul 2024 10:13:47 +0100 Subject: [PATCH 07/14] WIP --- app/schema_validation/__init__.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/app/schema_validation/__init__.py b/app/schema_validation/__init__.py index a7ab46f86c..cccc9526dc 100644 --- a/app/schema_validation/__init__.py +++ b/app/schema_validation/__init__.py @@ -7,7 +7,7 @@ from jsonschema import Draft7Validator, FormatChecker, ValidationError from notifications_utils.recipient_validation.email_address import validate_email_address from notifications_utils.recipient_validation.errors import InvalidEmailError, InvalidPhoneError -from notifications_utils.recipient_validation.phone_number import PhoneNumber, validate_phone_number +from notifications_utils.recipient_validation.phone_number import PhoneNumber format_checker = FormatChecker() @@ -20,16 +20,13 @@ def validate_uuid(instance): @format_checker.checks("phone_number", raises=ValidationError) -def validate_schema_phone_number(instance, can_send_to_landlines=False): +def validate_schema_phone_number(instance): if isinstance(instance, str): try: - if can_send_to_landlines: - phonenumber = PhoneNumber(instance, international=True) - phonenumber.validate_phone_number() - # validate_phone_number(instance, international=True) - else: - validate_phone_number(instance, international=True) + breakpoint() + phonenumber = PhoneNumber(instance, allow_international=True) + phonenumber.validate_phone_number(instance) except InvalidPhoneError as e: legacy_message = e.get_legacy_v2_api_error_message() raise ValidationError(legacy_message) from None From b2ba67be81b7d7d76ef35a502b6d10a5cb6dc034 Mon Sep 17 00:00:00 2001 From: Richard Parke Date: Mon, 15 Jul 2024 22:30:14 +0100 Subject: [PATCH 08/14] tidy up and remove breakpoint --- app/schema_validation/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/schema_validation/__init__.py b/app/schema_validation/__init__.py index cccc9526dc..79caea38ae 100644 --- a/app/schema_validation/__init__.py +++ b/app/schema_validation/__init__.py @@ -24,11 +24,10 @@ def validate_schema_phone_number(instance): if isinstance(instance, str): try: - breakpoint() - phonenumber = PhoneNumber(instance, allow_international=True) - phonenumber.validate_phone_number(instance) + PhoneNumber(instance, allow_international=True) except InvalidPhoneError as e: legacy_message = e.get_legacy_v2_api_error_message() + breakpoint() raise ValidationError(legacy_message) from None return True From 1db34355fa4e13f2304bb5eefccd3416e4583b0c Mon Sep 17 00:00:00 2001 From: Richard Parke Date: Mon, 15 Jul 2024 22:30:44 +0100 Subject: [PATCH 09/14] clean up breakpoints --- app/schema_validation/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/app/schema_validation/__init__.py b/app/schema_validation/__init__.py index 79caea38ae..7612549feb 100644 --- a/app/schema_validation/__init__.py +++ b/app/schema_validation/__init__.py @@ -27,7 +27,6 @@ def validate_schema_phone_number(instance): PhoneNumber(instance, allow_international=True) except InvalidPhoneError as e: legacy_message = e.get_legacy_v2_api_error_message() - breakpoint() raise ValidationError(legacy_message) from None return True From 0fae17928db41c8e6922b24c4109ffdcf7f4cda6 Mon Sep 17 00:00:00 2001 From: Richard Parke Date: Tue, 16 Jul 2024 10:42:58 +0100 Subject: [PATCH 10/14] updated notifications-utils --- requirements.in | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.in b/requirements.in index 1196497c40..2b59ef2437 100644 --- a/requirements.in +++ b/requirements.in @@ -23,7 +23,7 @@ lxml==4.9.3 notifications-python-client==8.0.1 -notifications-utils @ git+https://github.com/alphagov/notifications-utils.git@81.1.0 +notifications-utils @ git+https://github.com/alphagov/notifications-utils.git@81.1.1 # gds-metrics requires prometheseus 0.2.0, override that requirement as 0.7.1 brings significant performance gains prometheus-client==0.14.1 diff --git a/requirements.txt b/requirements.txt index a1d4d71e9a..965329f305 100644 --- a/requirements.txt +++ b/requirements.txt @@ -151,7 +151,7 @@ mistune==0.8.4 # via notifications-utils notifications-python-client==8.0.1 # via -r requirements.in -notifications-utils @ git+https://github.com/alphagov/notifications-utils.git@81.1.0 +notifications-utils @ git+https://github.com/alphagov/notifications-utils.git@81.1.1 # via -r requirements.in ordered-set==4.1.0 # via notifications-utils From 220e44051d7c2eee156c3641dc0d796c5de39322 Mon Sep 17 00:00:00 2001 From: Richard Parke Date: Tue, 16 Jul 2024 13:49:28 +0100 Subject: [PATCH 11/14] updated test to tolerate generic invalid number error (to support move to landlines) --- tests/app/v2/notifications/test_notification_schemas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/app/v2/notifications/test_notification_schemas.py b/tests/app/v2/notifications/test_notification_schemas.py index daa70296b3..027fc61ad9 100644 --- a/tests/app/v2/notifications/test_notification_schemas.py +++ b/tests/app/v2/notifications/test_notification_schemas.py @@ -180,7 +180,7 @@ def test_post_sms_schema_with_personalisation_that_is_not_a_dict(): @pytest.mark.parametrize( "invalid_phone_number, err_msg", [ - ("08515111111", "phone_number Not a UK mobile number"), + ("08515111111", "Number is not valid – double check the phone number you entered"), ("07515111*11", "phone_number Must not contain letters or symbols"), ("notaphoneumber", "phone_number Must not contain letters or symbols"), (7700900001, "phone_number 7700900001 is not of type string"), From f1aa21f66029e073a1a46a271369d76bb7d0ec1f Mon Sep 17 00:00:00 2001 From: Richard Parke Date: Tue, 16 Jul 2024 13:54:04 +0100 Subject: [PATCH 12/14] fix test param --- tests/app/v2/notifications/test_notification_schemas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/app/v2/notifications/test_notification_schemas.py b/tests/app/v2/notifications/test_notification_schemas.py index 027fc61ad9..4c7d85e4c7 100644 --- a/tests/app/v2/notifications/test_notification_schemas.py +++ b/tests/app/v2/notifications/test_notification_schemas.py @@ -180,7 +180,7 @@ def test_post_sms_schema_with_personalisation_that_is_not_a_dict(): @pytest.mark.parametrize( "invalid_phone_number, err_msg", [ - ("08515111111", "Number is not valid – double check the phone number you entered"), + ("08515111111", "phone_number Number is not valid – double check the phone number you entered"), ("07515111*11", "phone_number Must not contain letters or symbols"), ("notaphoneumber", "phone_number Must not contain letters or symbols"), (7700900001, "phone_number 7700900001 is not of type string"), From 4ec527017a0b55962c466e44f828a1bac1f085b9 Mon Sep 17 00:00:00 2001 From: Richard Parke Date: Tue, 16 Jul 2024 15:22:01 +0100 Subject: [PATCH 13/14] updated error --- tests/app/v2/notifications/test_notification_schemas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/app/v2/notifications/test_notification_schemas.py b/tests/app/v2/notifications/test_notification_schemas.py index 4c7d85e4c7..a3ce369482 100644 --- a/tests/app/v2/notifications/test_notification_schemas.py +++ b/tests/app/v2/notifications/test_notification_schemas.py @@ -206,7 +206,7 @@ def test_post_sms_request_schema_invalid_phone_number_and_missing_template(): validate(j, post_sms_request_schema) errors = json.loads(str(e.value)).get("errors") assert len(errors) == 2 - assert {"error": "ValidationError", "message": "phone_number Not a UK mobile number"} in errors + assert {"error": "ValidationError", "message": "phone_number Number is not valid – double check the phone number you entered"} in errors assert {"error": "ValidationError", "message": "template_id is a required property"} in errors From ce94a07347bf2e8cb6ed94d2eb552db2302448e9 Mon Sep 17 00:00:00 2001 From: Richard Parke Date: Tue, 16 Jul 2024 16:18:27 +0100 Subject: [PATCH 14/14] updated test param, invalid international number that wasn't caught before --- tests/app/v2/notifications/test_post_notifications.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/app/v2/notifications/test_post_notifications.py b/tests/app/v2/notifications/test_post_notifications.py index 19b55374b9..13caf43f24 100644 --- a/tests/app/v2/notifications/test_post_notifications.py +++ b/tests/app/v2/notifications/test_post_notifications.py @@ -840,7 +840,7 @@ def test_post_sms_notification_returns_400_if_number_not_in_guest_list( template = create_template(service=service) data = { - "phone_number": "+327700900855", + "phone_number": "+3225484211", "template_id": template.id, }