diff options
| author | Chaitanya Rahalkar <chaitanyarahalkar4@gmail.com> | 2024-12-17 23:17:17 -0600 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2025-01-08 10:20:11 +0100 |
| commit | c068f000be7c486abb8b17fc565383679d7d4f82 (patch) | |
| tree | 0ee3fc0e65ba54008f1d786735ea6ed4b36e429d /tests/forms_tests | |
| parent | 53e21eebf22bc05c7fa30820b453b7f345b7af40 (diff) | |
Fixed #36014 -- Supported international domains in EmailValidator.
Diffstat (limited to 'tests/forms_tests')
| -rw-r--r-- | tests/forms_tests/field_tests/test_emailfield.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/forms_tests/field_tests/test_emailfield.py b/tests/forms_tests/field_tests/test_emailfield.py index 601318bae3..cfebf4216d 100644 --- a/tests/forms_tests/field_tests/test_emailfield.py +++ b/tests/forms_tests/field_tests/test_emailfield.py @@ -31,7 +31,8 @@ class EmailFieldTest(FormFieldAssertionsMixin, SimpleTestCase): # Check for runaway regex security problem. This will take a long time # if the security fix isn't in place. addr = "viewx3dtextx26qx3d@yahoo.comx26latlngx3d15854521645943074058" - self.assertEqual(addr, f.clean(addr)) + with self.assertRaisesMessage(ValidationError, "Enter a valid email address."): + f.clean(addr) def test_emailfield_not_required(self): f = EmailField(required=False) |
