MCPcopy
hub / github.com/django/django / test_bad_request

Method test_bad_request

tests/view_tests/tests/test_defaults.py:100–103  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

98 self.assertContains(response, b"<h1>Server Error (500)</h1>", status_code=500)
99
100 def test_bad_request(self):
101 request = self.request_factory.get("/")
102 response = bad_request(request, Exception())
103 self.assertContains(response, b"<h1>Bad Request (400)</h1>", status_code=400)
104
105 @override_settings(
106 TEMPLATES=[

Callers

nothing calls this directly

Calls 3

bad_requestFunction · 0.90
assertContainsMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected