def test_extra_template_params(self):
        response = self.client.get('/template/custom/bar/')
        self.assertEqual(response.status_code, 200)
        self.assertEqual(response.context['foo'], 'bar')
        self.assertEqual(response.context['key'], 'value')
        self.assertIsInstance(response.context['view'], View)
A template view can be customized to return extra context.
dataset/ETHPy150Open django/django/tests/generic_views/test_base.py/TemplateViewTest.test_extra_template_params