diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2014-11-15 20:58:26 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2014-11-16 21:41:44 +0100 |
| commit | 9eeb788cfb70d07d87b3d07434d6a149ab2d7471 (patch) | |
| tree | 10045a7dde41390e86c4e9c471f6955b69a8ce09 /tests/test_client_regress | |
| parent | 1851dcf377d05a5d167cf482674e4c4a4e2502a5 (diff) | |
Refactored getting the list of template loaders.
This provides the opportunity to move utility functions specific to the
Django Template Language outside of django.template.loader.
Diffstat (limited to 'tests/test_client_regress')
| -rw-r--r-- | tests/test_client_regress/tests.py | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/tests/test_client_regress/tests.py b/tests/test_client_regress/tests.py index 9ceba4992f..f7dcae15cf 100644 --- a/tests/test_client_regress/tests.py +++ b/tests/test_client_regress/tests.py @@ -8,8 +8,7 @@ import os import itertools from django.core.urlresolvers import reverse, NoReverseMatch -from django.template import (TemplateSyntaxError, - Context, Template, loader) +from django.template import TemplateSyntaxError, Context, Template import django.template.context from django.test import Client, TestCase, override_settings from django.test.client import encode_file, RequestFactory @@ -902,13 +901,6 @@ class ExceptionTests(TestCase): @override_settings(ROOT_URLCONF='test_client_regress.urls') class TemplateExceptionTests(TestCase): - def setUp(self): - # Reset the loaders so they don't try to render cached templates. - if loader.template_source_loaders is not None: - for template_loader in loader.template_source_loaders: - if hasattr(template_loader, 'reset'): - template_loader.reset() - @override_settings( TEMPLATE_DIRS=(os.path.join(os.path.dirname(upath(__file__)), 'bad_templates'),) ) @@ -916,9 +908,10 @@ class TemplateExceptionTests(TestCase): "Errors found when rendering 404 error templates are re-raised" try: self.client.get("/no_such_view/") - self.fail("Should get error about syntax error in template") except TemplateSyntaxError: pass + else: + self.fail("Should get error about syntax error in template") # We need two different tests to check URLconf substitution - one to check |
