From 252cd271e88e1c60fc49c06fac9d45e4c7f8750e Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Tue, 9 Oct 2012 22:40:44 +0200 Subject: [PATCH] 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. --- tests/regressiontests/forms/tests/fields.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/regressiontests/forms/tests/fields.py b/tests/regressiontests/forms/tests/fields.py index 12661d01f5..1027afceb1 100644 --- a/tests/regressiontests/forms/tests/fields.py +++ b/tests/regressiontests/forms/tests/fields.py @@ -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)