@require_jinja2
    def test_template_engine(self):
        request = self.rf.get('/using/')
        view = TemplateView.as_view(template_name='generic_views/using.html')
        self.assertEqual(view(request).render().content, b'DTL\n')
        view = TemplateView.as_view(template_name='generic_views/using.html', template_engine='django')
        self.assertEqual(view(request).render().content, b'DTL\n')
        view = TemplateView.as_view(template_name='generic_views/using.html', template_engine='jinja2')
        self.assertEqual(view(request).render().content, b'Jinja2\n')
This methods allow use to redirect messages sent to stderr into a string
dataset/ETHPy150Open django/django/tests/generic_views/test_base.py/TemplateViewTest.test_template_engine--crossover with--dataset/ETHPy150Open baseblack/ReproWeb/3rdParty/python/fapws/base.py/redirectStdErr