1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

[1.5.x] Updated deprecated test assertions

This commit is contained in:
Claude Paroz
2013-01-08 19:07:12 +01:00
parent b6119a6373
commit beef02eeaa
5 changed files with 9 additions and 9 deletions

View File

@@ -370,13 +370,13 @@ class Templates(TestCase):
# Regression test for #19280
t = Template('{% url path.to.view %}') # not quoted = old syntax
c = Context()
with self.assertRaisesRegexp(urlresolvers.NoReverseMatch,
with six.assertRaisesRegex(self, urlresolvers.NoReverseMatch,
"The syntax changed in Django 1.5, see the docs."):
t.render(c)
def test_url_explicit_exception_for_old_syntax_at_compile_time(self):
# Regression test for #19392
with self.assertRaisesRegexp(template.TemplateSyntaxError,
with six.assertRaisesRegex(self, template.TemplateSyntaxError,
"The syntax of 'url' changed in Django 1.5, see the docs."):
t = Template('{% url my-view %}') # not a variable = old syntax