MCPcopy
hub / github.com/django/django / test_404

Method test_404

tests/servers/tests.py:276–280  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

274 self.assertEqual(response.read(), b"POST")
275
276 def test_404(self):
277 with self.assertRaises(HTTPError) as err:
278 self.urlopen("/")
279 err.exception.close()
280 self.assertEqual(err.exception.code, 404, "Expected 404 response")
281
282 def test_view(self):
283 with self.urlopen("/example_view/") as f:

Callers

nothing calls this directly

Calls 2

urlopenMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected