diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2015-02-17 22:49:59 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2015-02-19 22:08:11 +0100 |
| commit | 1bfcc950ab6e5264bbaf2eba0ce3d3e23d671404 (patch) | |
| tree | 344355bd667ab1a7ab33c3c89bfdf59cb03090bf /tests/template_tests/tests.py | |
| parent | efb1f99f943b99624c78b91ff58502125490191e (diff) | |
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.
Diffstat (limited to 'tests/template_tests/tests.py')
| -rw-r--r-- | tests/template_tests/tests.py | 7 |
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) |
