MCPcopy
hub / github.com/django/django / test_headers

Method test_headers

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

Source from the content-addressed store, hash-verified

364 pickle.dumps(unpickled_response)
365
366 def test_headers(self):
367 response = TemplateResponse(
368 self.factory.get("/"),
369 "first/test.html",
370 {"value": 123, "fn": datetime.now},
371 headers={"X-Foo": "foo"},
372 )
373 self.assertEqual(response.headers["X-Foo"], "foo")
374
375
376@modify_settings(

Callers

nothing calls this directly

Calls 2

TemplateResponseClass · 0.90
getMethod · 0.45

Tested by

no test coverage detected