From b748a8bc670af10c37560836c353ce911eaeecc0 Mon Sep 17 00:00:00 2001 From: Luke Plant Date: Mon, 10 Nov 2014 14:43:40 +0000 Subject: Fixed #23789 -- TemplateResponse handles context differently from render --- tests/template_tests/test_response.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') 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) -- cgit v1.3