Skip to content

Commit

Permalink
update mock to mock out PhoneNumber constructor rather than the old v…
Browse files Browse the repository at this point in the history
…alidation method
  • Loading branch information
rparke committed Nov 12, 2024
1 parent 7c24355 commit f096108
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/app/main/test_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def test_invalid_list_of_white_list_email_domains(
def test_uk_mobile_number_validation_messages_match(mocker):
mock_field = _gen_mock_field("notanumber", error_summary_messages=[])
mocker.patch(
"app.main.validators.validate_phone_number",
"app.main.validators.PhoneNumber",
side_effect=InvalidPhoneError(code=InvalidPhoneError.Codes.UNKNOWN_CHARACTER),
)
with pytest.raises(ValidationError) as error:
Expand Down

0 comments on commit f096108

Please sign in to comment.