diff options
Diffstat (limited to 'tests/template_tests')
| -rw-r--r-- | tests/template_tests/test_response.py | 11 | ||||
| -rw-r--r-- | tests/template_tests/tests.py | 9 |
2 files changed, 10 insertions, 10 deletions
diff --git a/tests/template_tests/test_response.py b/tests/template_tests/test_response.py index ab01da5804..6ae5457c98 100644 --- a/tests/template_tests/test_response.py +++ b/tests/template_tests/test_response.py @@ -208,10 +208,13 @@ class SimpleTemplateResponseTest(SimpleTestCase): self.assertEqual(unpickled_response.cookies['key'].value, 'value') -@override_settings( - TEMPLATE_CONTEXT_PROCESSORS=[test_processor_name], - TEMPLATE_DIRS=(os.path.join(os.path.dirname(upath(__file__)), 'templates')), -) +@override_settings(TEMPLATES=[{ + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [os.path.join(os.path.dirname(upath(__file__)), 'templates')], + 'OPTIONS': { + 'context_processors': [test_processor_name], + }, +}]) class TemplateResponseTest(SimpleTestCase): def setUp(self): diff --git a/tests/template_tests/tests.py b/tests/template_tests/tests.py index 876df43aa4..d0e659b76a 100644 --- a/tests/template_tests/tests.py +++ b/tests/template_tests/tests.py @@ -86,13 +86,11 @@ class TemplateLoaderTests(SimpleTestCase): # the compiled templates. @override_settings(TEMPLATE_DEBUG=True) def test_loader_debug_origin(self): - # We rely on the fact that runtests.py sets up TEMPLATE_DIRS to - # point to a directory containing a login.html file. load_name = 'login.html' - # We also rely on the fact the file system and app directories loaders - # both inherit the load_template method from the base Loader class, so - # we only need to test one of them. + # We rely on the fact the file system and app directories loaders both + # inherit the load_template method from the base Loader class, so we + # only need to test one of them. template = loader.get_template(load_name).template template_name = template.nodelist[0].source[0].name self.assertTrue(template_name.endswith(load_name), @@ -111,7 +109,6 @@ class TemplateLoaderTests(SimpleTestCase): }]) @override_settings(TEMPLATE_DEBUG=True) def test_cached_loader_debug_origin(self): - # Same comment as in test_loader_debug_origin. load_name = 'login.html' # Test the cached loader separately since it overrides load_template. |
