summaryrefslogtreecommitdiff
path: root/tests/template_tests/tests.py
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2014-11-28 22:13:11 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2014-12-28 16:23:01 +0100
commit4ea43ac915e187fb0c283094504f488d5017d7ec (patch)
tree9c8de42405e8ff74a5ae80ec1ec39fe5102a76a5 /tests/template_tests/tests.py
parent6854998c8f405248c304cf14ecc46617e8a9f206 (diff)
Supported multiple template engines in get_template and select_template.
This commit changes the return type of these two functions. Instead of returning a django.template.Template they return a backend-specific Template class that must implement render(self, context).
Diffstat (limited to 'tests/template_tests/tests.py')
-rw-r--r--tests/template_tests/tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/template_tests/tests.py b/tests/template_tests/tests.py
index 80f926ea6f..5d4b029430 100644
--- a/tests/template_tests/tests.py
+++ b/tests/template_tests/tests.py
@@ -85,7 +85,7 @@ class TemplateLoaderTests(SimpleTestCase):
# 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.
- template = loader.get_template(load_name)
+ template = loader.get_template(load_name).template
template_name = template.nodelist[0].source[0].name
self.assertTrue(template_name.endswith(load_name),
'Template loaded by filesystem loader has incorrect name for debug page: %s' % template_name)
@@ -100,12 +100,12 @@ class TemplateLoaderTests(SimpleTestCase):
load_name = 'login.html'
# Test the cached loader separately since it overrides load_template.
- template = loader.get_template(load_name)
+ template = loader.get_template(load_name).template
template_name = template.nodelist[0].source[0].name
self.assertTrue(template_name.endswith(load_name),
'Template loaded through cached loader has incorrect name for debug page: %s' % template_name)
- template = loader.get_template(load_name)
+ template = loader.get_template(load_name).template
template_name = template.nodelist[0].source[0].name
self.assertTrue(template_name.endswith(load_name),
'Cached template loaded through cached loader has incorrect name for debug page: %s' % template_name)