mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Updated deprecated test assertions
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user