Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[1.0.X] Fixed the test in [10351] to work reguardless of the test set…

…tings. Backport of r10355 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10356 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit c51722373b252730bef72a148ce097a48c15940b 1 parent ef0a5fb
Jacob Kaplan-Moss jacobian authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 tests/regressiontests/templates/tests.py
7 tests/regressiontests/templates/tests.py
View
@@ -152,8 +152,13 @@ def test_token_smart_split(self):
def test_url_reverse_no_settings_module(self):
#Regression test for #9005
from django.template import Template, Context, TemplateSyntaxError
+
old_settings_module = settings.SETTINGS_MODULE
+ old_template_debug = settings.TEMPLATE_DEBUG
+
settings.SETTINGS_MODULE = None
+ settings.TEMPLATE_DEBUG = True
+
t = Template('{% url will_not_match %}')
c = Context()
try:
@@ -162,7 +167,9 @@ def test_url_reverse_no_settings_module(self):
#Assert that we are getting the template syntax error and not the
#string encoding error.
self.assertEquals(e.message, "Caught an exception while rendering: Reverse for 'will_not_match' with arguments '()' and keyword arguments '{}' not found.")
+
settings.SETTINGS_MODULE = old_settings_module
+ settings.TEMPLATE_DEBUG = old_template_debug
def test_templates(self):
template_tests = self.get_template_tests()
Please sign in to comment.
Something went wrong with that request. Please try again.