summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2012-11-25 19:51:42 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2012-11-25 19:53:50 +0100
commit37c54c27bdb555de8525fbb56681cf4448d0020c (patch)
tree6882596d4fb0689325925ea8436ec330cdd9c7b3 /tests
parent72231610b3b1211a7d38e6fde03e77faff741862 (diff)
[1.5.x] Change exception type to reduce confusion.
TemplateSyntaxError is expected at compile time, not at run time. Refs #19280. Backport of 7644800.
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/templates/tests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/regressiontests/templates/tests.py b/tests/regressiontests/templates/tests.py
index 6d55ebbc17..b46e38cc15 100644
--- a/tests/regressiontests/templates/tests.py
+++ b/tests/regressiontests/templates/tests.py
@@ -20,7 +20,7 @@ except ImportError: # Python 2
from django import template
from django.template import (base as template_base, Context, RequestContext,
- Template, TemplateSyntaxError)
+ Template)
from django.core import urlresolvers
from django.template import loader
from django.template.loaders import app_directories, filesystem, cached
@@ -369,7 +369,7 @@ class Templates(TestCase):
# Regression test for #19280
t = Template('{% url path.to.view %}') # not quoted = old syntax
c = Context()
- with self.assertRaisesRegexp(TemplateSyntaxError,
+ with self.assertRaisesRegexp(urlresolvers.NoReverseMatch,
"The syntax changed in Django 1.5, see the docs."):
t.render(c)