From cc4effba0bf07fbcb4dcc0074af969e698b6cc75 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Tue, 17 Feb 2015 22:49:59 +0100 Subject: [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 --- tests/template_tests/tests.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'tests') 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) -- cgit v1.3