summaryrefslogtreecommitdiff
path: root/tests/template_tests/test_response.py
diff options
context:
space:
mode:
authorLuke Plant <L.Plant.98@cantab.net>2014-11-10 14:43:40 +0000
committerLuke Plant <L.Plant.98@cantab.net>2014-11-10 14:47:45 +0000
commitb748a8bc670af10c37560836c353ce911eaeecc0 (patch)
tree099388cd7a6168b67e6dcde81e2e1f1dd42a9c89 /tests/template_tests/test_response.py
parent006451f8943af2974a9a2c105dbc8470a33624c1 (diff)
Fixed #23789 -- TemplateResponse handles context differently from render
Diffstat (limited to 'tests/template_tests/test_response.py')
-rw-r--r--tests/template_tests/test_response.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/template_tests/test_response.py b/tests/template_tests/test_response.py
index 8791a11353..d7dd3f4d31 100644
--- a/tests/template_tests/test_response.py
+++ b/tests/template_tests/test_response.py
@@ -233,6 +233,12 @@ class TemplateResponseTest(TestCase):
Context({'foo': 'bar'})).render()
self.assertEqual(response.content, b'bar')
+ def test_context_processor_priority(self):
+ # context processors should be overridden by passed-in context
+ response = self._response('{{ foo }}{{ processors }}',
+ {'processors': 'no'}).render()
+ self.assertEqual(response.content, b'no')
+
def test_kwargs(self):
response = self._response(content_type='application/json',
status=504)