MCPcopy Index your code
hub / github.com/python/cpython / test_404

Method test_404

Lib/test/test_xmlrpc.py:856–864  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

854 self.fail("%s\n%s" % (e, getattr(e, "headers", "")))
855
856 def test_404(self):
857 # send POST with http.client, it should return 404 header and
858 # 'Not Found' message.
859 with contextlib.closing(http.client.HTTPConnection(ADDR, PORT)) as conn:
860 conn.request('POST', '/this-is-not-valid')
861 response = conn.getresponse()
862
863 self.assertEqual(response.status, 404)
864 self.assertEqual(response.reason, 'Not Found')
865
866 def test_introspection1(self):
867 expected_methods = set(['pow', 'div', 'my_function', 'add', 'têšt',

Callers

nothing calls this directly

Calls 3

requestMethod · 0.45
getresponseMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected