From 47d345fe6dbd20b5b24671e432da11883eba261f Mon Sep 17 00:00:00 2001 From: Florian Apolloner Date: Mon, 26 May 2014 00:07:15 +0200 Subject: [PATCH] [1.7.x] Restored Python 2 compatibility. Backport of ee51ab9d232e52d17cd5ad32e230fd715cffe638 from master. --- tests/forms_tests/tests/test_forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/forms_tests/tests/test_forms.py b/tests/forms_tests/tests/test_forms.py index 93deec7bd1..a410e9a0f1 100644 --- a/tests/forms_tests/tests/test_forms.py +++ b/tests/forms_tests/tests/test_forms.py @@ -59,7 +59,7 @@ class FormsTestCase(TestCase): self.assertHTMLEqual(str(p['birthday']), '') nonexistenterror = "Key u?'nonexistentfield' not found in 'Person'" - with self.assertRaisesRegex(KeyError, nonexistenterror): + with six.assertRaisesRegex(self, KeyError, nonexistenterror): p['nonexistentfield'] self.fail('Attempts to access non-existent fields should fail.')