summaryrefslogtreecommitdiff
path: root/tests/test_utils/tests.py
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-12-07 17:42:31 -0500
committerGitHub <noreply@github.com>2016-12-07 17:42:31 -0500
commitb5f0b3478dfcf0335f8ac2038d59f54b4a05f2a0 (patch)
treef3eb61bfdcf45c7b27fe3c480e9a7533746d1aad /tests/test_utils/tests.py
parentf909fa84bedb51778a175aadfe4cfe7a91fe06cd (diff)
Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase.
Diffstat (limited to 'tests/test_utils/tests.py')
-rw-r--r--tests/test_utils/tests.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/test_utils/tests.py b/tests/test_utils/tests.py
index 969cbf7659..0013452cac 100644
--- a/tests/test_utils/tests.py
+++ b/tests/test_utils/tests.py
@@ -368,16 +368,15 @@ class AssertTemplateUsedContextManagerTests(SimpleTestCase):
pass
def test_error_message(self):
- with six.assertRaisesRegex(self, AssertionError, r'^template_used/base\.html'):
+ with self.assertRaisesRegex(AssertionError, r'^template_used/base\.html'):
with self.assertTemplateUsed('template_used/base.html'):
pass
- with six.assertRaisesRegex(self, AssertionError, r'^template_used/base\.html'):
+ with self.assertRaisesRegex(AssertionError, r'^template_used/base\.html'):
with self.assertTemplateUsed(template_name='template_used/base.html'):
pass
- with six.assertRaisesRegex(
- self, AssertionError, r'^template_used/base\.html.*template_used/alternative\.html$'):
+ with self.assertRaisesRegex(AssertionError, r'^template_used/base\.html.*template_used/alternative\.html$'):
with self.assertTemplateUsed('template_used/base.html'):
render_to_string('template_used/alternative.html')