Merge branch 'main' into za/1523-inconsistent-error-messages

This commit is contained in:
zandercymatics 2024-01-17 13:17:08 -07:00
commit 585fefce88
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
62 changed files with 2261 additions and 753 deletions

View file

@ -34,7 +34,7 @@ class TestFormValidation(MockEppLib):
form = OrganizationContactForm(data={"zipcode": "nah"})
self.assertEqual(
form.errors["zipcode"],
["Enter a zip code in the required format, like 12345 or 12345-6789."],
["Enter a zip code in the form of 12345 or 12345-6789."],
)
def test_org_contact_zip_valid(self):
@ -46,7 +46,7 @@ class TestFormValidation(MockEppLib):
form = CurrentSitesForm(data={"website": "nah"})
self.assertEqual(
form.errors["website"],
["Enter your organization's current website in the required format, like www.city.com."],
["Enter your organization's current website in the required format, like example.com."],
)
def test_website_valid(self):
@ -318,7 +318,7 @@ class TestFormValidation(MockEppLib):
def test_your_contact_phone_invalid(self):
"""Must be a valid phone number."""
form = YourContactForm(data={"phone": "boss@boss"})
self.assertTrue(form.errors["phone"][0].startswith("Enter a valid phone number "))
self.assertTrue(form.errors["phone"][0].startswith("Enter a valid 10-digit phone number."))
def test_other_contact_email_invalid(self):
"""must be a valid email address."""
@ -331,7 +331,7 @@ class TestFormValidation(MockEppLib):
def test_other_contact_phone_invalid(self):
"""Must be a valid phone number."""
form = OtherContactsForm(data={"phone": "super@boss"})
self.assertTrue(form.errors["phone"][0].startswith("Enter a valid phone number "))
self.assertTrue(form.errors["phone"][0].startswith("Enter a valid 10-digit phone number."))
def test_requirements_form_blank(self):
"""Requirements box unchecked is an error."""