1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed #23789 -- TemplateResponse handles context differently from render

This commit is contained in:
Luke Plant
2014-11-10 14:43:40 +00:00
parent 006451f894
commit b748a8bc67
4 changed files with 28 additions and 4 deletions

View File

@@ -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)