summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2015-02-17 22:49:59 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2015-02-19 22:10:56 +0100
commitcc4effba0bf07fbcb4dcc0074af969e698b6cc75 (patch)
treeefa5c227513168711732b0d14db6b09f62a21e4e /tests
parent84e7fec88ddfc4178500a80d640728226d77317a (diff)
[1.8.x] Set context.template instead of context.engine while rendering.
This opens more possibilities, like accessing context.template.origin. It also follows the chain of objects instead of following a shortcut. Backport of 1bfcc95 from master
Diffstat (limited to 'tests')
-rw-r--r--tests/template_tests/tests.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/template_tests/tests.py b/tests/template_tests/tests.py
index cf37e1868b..77115d061a 100644
--- a/tests/template_tests/tests.py
+++ b/tests/template_tests/tests.py
@@ -516,9 +516,6 @@ class RequestContextTests(unittest.TestCase):
self.assertEqual(len(ctx.dicts), 3)
def test_context_comparable(self):
- # Create an engine without any context processors.
- engine = Engine()
-
test_data = {'x': 'y', 'v': 'z', 'd': {'o': object, 'a': 'b'}}
# test comparing RequestContext to prevent problems if somebody
@@ -526,8 +523,8 @@ class RequestContextTests(unittest.TestCase):
request = RequestFactory().get('/')
self.assertEqual(
- RequestContext(request, dict_=test_data, engine=engine),
- RequestContext(request, dict_=test_data, engine=engine))
+ RequestContext(request, dict_=test_data),
+ RequestContext(request, dict_=test_data))
@ignore_warnings(category=RemovedInDjango20Warning)