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

Method test_version_none

Lib/test/test_httpservers.py:243–249  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

241 self.assertEqual(res.status, HTTPStatus.NOT_IMPLEMENTED)
242
243 def test_version_none(self):
244 # Test that a valid method is rejected when not HTTP/1.x
245 self.con._http_vsn_str = ''
246 self.con.putrequest('CUSTOM', '/')
247 self.con.endheaders()
248 res = self.con.getresponse()
249 self.assertEqual(res.status, HTTPStatus.BAD_REQUEST)
250
251 def test_version_invalid(self):
252 self.con._http_vsn = 99

Callers

nothing calls this directly

Calls 4

putrequestMethod · 0.80
endheadersMethod · 0.80
getresponseMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected