MCPcopy
hub / github.com/django/django / test_15368

Method test_15368

tests/test_client_regress/tests.py:884–902  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

882 self.assertEqual(k.get("nonexistent", "default"), "default")
883
884 def test_15368(self):
885 # Need to insert a context processor that assumes certain things about
886 # the request instance. This triggers a bug caused by some ways of
887 # copying RequestContext.
888 with self.settings(
889 TEMPLATES=[
890 {
891 "BACKEND": "django.template.backends.django.DjangoTemplates",
892 "APP_DIRS": True,
893 "OPTIONS": {
894 "context_processors": [
895 "test_client_regress.context_processors.special",
896 ],
897 },
898 }
899 ]
900 ):
901 response = self.client.get("/request_context_view/")
902 self.assertContains(response, "Path: /request_context_view/")
903
904 def test_nested_requests(self):
905 """

Callers

nothing calls this directly

Calls 3

assertContainsMethod · 0.80
settingsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected