summaryrefslogtreecommitdiff
path: root/tests/regressiontests/forms
diff options
context:
space:
mode:
Diffstat (limited to 'tests/regressiontests/forms')
-rw-r--r--tests/regressiontests/forms/tests/error_messages.py2
-rw-r--r--tests/regressiontests/forms/tests/validators.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/regressiontests/forms/tests/error_messages.py b/tests/regressiontests/forms/tests/error_messages.py
index 973bf22ab1..7153a3b0a6 100644
--- a/tests/regressiontests/forms/tests/error_messages.py
+++ b/tests/regressiontests/forms/tests/error_messages.py
@@ -13,7 +13,7 @@ class AssertFormErrorsMixin(object):
try:
the_callable(*args, **kwargs)
self.fail("Testing the 'clean' method on %s failed to raise a ValidationError.")
- except ValidationError, e:
+ except ValidationError as e:
self.assertEqual(e.messages, expected)
class FormsErrorMessagesTestCase(TestCase, AssertFormErrorsMixin):
diff --git a/tests/regressiontests/forms/tests/validators.py b/tests/regressiontests/forms/tests/validators.py
index cadf660ab8..a4cb324815 100644
--- a/tests/regressiontests/forms/tests/validators.py
+++ b/tests/regressiontests/forms/tests/validators.py
@@ -12,5 +12,5 @@ class TestFieldWithValidators(TestCase):
self.assertRaises(ValidationError, field.clean, 'not int nor mail')
try:
field.clean('not int nor mail')
- except ValidationError, e:
+ except ValidationError as e:
self.assertEqual(2, len(e.messages))