0
0
mirror of https://github.com/django/django.git synced 2024-12-01 15:42:04 +01:00

Fixed test failure after IDN domain validation fix

Refs #17867.
The address in test_email_regexp_for_performance used to take forever
(security issue), then was supposed to fail after the fix (commit 9f8287a3f).
Now we are less strict with domain validation, due to new IDN domains,
hence the validation of this address pass now.
This commit is contained in:
Claude Paroz 2012-10-09 22:40:44 +02:00
parent 0a0fe8f71d
commit 252cd271e8

View File

@ -516,12 +516,8 @@ class FieldsTests(SimpleTestCase):
f = EmailField()
# Check for runaway regex security problem. This will take for-freeking-ever
# if the security fix isn't in place.
self.assertRaisesMessage(
ValidationError,
"'Enter a valid email address.'",
f.clean,
'viewx3dtextx26qx3d@yahoo.comx26latlngx3d15854521645943074058'
)
addr = 'viewx3dtextx26qx3d@yahoo.comx26latlngx3d15854521645943074058'
self.assertEqual(addr, f.clean(addr))
def test_emailfield_not_required(self):
f = EmailField(required=False)