1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

[py3k] Silence many warnings while running the tests.

This commit is contained in:
Alex Gaynor
2012-09-07 13:17:09 -04:00
parent 4321ee25c5
commit 292322f977
29 changed files with 213 additions and 196 deletions

View File

@@ -137,15 +137,15 @@ class AssertTemplateUsedContextManagerTests(TestCase):
pass
def test_error_message(self):
with self.assertRaisesRegexp(AssertionError, r'^template_used/base\.html'):
with six.assertRaisesRegex(self, AssertionError, r'^template_used/base\.html'):
with self.assertTemplateUsed('template_used/base.html'):
pass
with self.assertRaisesRegexp(AssertionError, r'^template_used/base\.html'):
with six.assertRaisesRegex(self, AssertionError, r'^template_used/base\.html'):
with self.assertTemplateUsed(template_name='template_used/base.html'):
pass
with self.assertRaisesRegexp(AssertionError, r'^template_used/base\.html.*template_used/alternative\.html$'):
with six.assertRaisesRegex(self, AssertionError, r'^template_used/base\.html.*template_used/alternative\.html$'):
with self.assertTemplateUsed('template_used/base.html'):
render_to_string('template_used/alternative.html')