MCPcopy
hub / github.com/django/django / test_using

Method test_using

tests/template_tests/test_response.py:296–307  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

294
295 @require_jinja2
296 def test_using(self):
297 request = self.factory.get("/")
298 response = TemplateResponse(request, "template_tests/using.html").render()
299 self.assertEqual(response.content, b"DTL\n")
300 response = TemplateResponse(
301 request, "template_tests/using.html", using="django"
302 ).render()
303 self.assertEqual(response.content, b"DTL\n")
304 response = TemplateResponse(
305 request, "template_tests/using.html", using="jinja2"
306 ).render()
307 self.assertEqual(response.content, b"Jinja2\n")
308
309 def test_pickling(self):
310 # Create a template response. The context is

Callers

nothing calls this directly

Calls 3

TemplateResponseClass · 0.90
getMethod · 0.45
renderMethod · 0.45

Tested by

no test coverage detected