Commit 252cd271 authored by Claude Paroz's avatar Claude Paroz
Browse files

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 9f8287a3).
Now we are less strict with domain validation, due to new IDN domains,
hence the validation of this address pass now.
parent 0a0fe8f7
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -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)