mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #16744 -- Class based view should have the view object in the context
Updated the most recent patch from @claudep to apply again and updated the documentation location.
This commit is contained in:
committed by
Andrew Godwin
parent
547b181046
commit
58683e9c82
@@ -276,6 +276,7 @@ class TemplateViewTest(TestCase):
|
||||
response = self.client.get('/template/simple/bar/')
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertEqual(response.context['params'], {'foo': 'bar'})
|
||||
self.assertTrue(isinstance(response.context['view'], View))
|
||||
|
||||
def test_extra_template_params(self):
|
||||
"""
|
||||
@@ -285,6 +286,7 @@ class TemplateViewTest(TestCase):
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertEqual(response.context['params'], {'foo': 'bar'})
|
||||
self.assertEqual(response.context['key'], 'value')
|
||||
self.assertTrue(isinstance(response.context['view'], View))
|
||||
|
||||
def test_cached_views(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user