diff options
| author | Jacob Kaplan-Moss <jacob@jacobian.org> | 2009-04-02 01:40:56 +0000 |
|---|---|---|
| committer | Jacob Kaplan-Moss <jacob@jacobian.org> | 2009-04-02 01:40:56 +0000 |
| commit | 751234bfd9afa76bafa93e17b6ed8a5d99a3010f (patch) | |
| tree | 91e0f56d251d4d9b0f9d20edda5ca04ff2703ed8 /tests/regressiontests/templates | |
| parent | 8f7aa84def3c13dd706aae1f5bfbcdb54b0696ee (diff) | |
Fixed the test in [10351] to work reguardless of the test settings.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10355 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/templates')
| -rw-r--r-- | tests/regressiontests/templates/tests.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/regressiontests/templates/tests.py b/tests/regressiontests/templates/tests.py index 71ca782384..5eeaa5a430 100644 --- a/tests/regressiontests/templates/tests.py +++ b/tests/regressiontests/templates/tests.py @@ -156,8 +156,13 @@ class Templates(unittest.TestCase): 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: @@ -166,7 +171,9 @@ class Templates(unittest.TestCase): #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() |
