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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user