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

Method test_header_keep_alive

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

Source from the content-addressed store, hash-verified

271 self.assertEqual(res.status, HTTPStatus.NOT_IMPLEMENTED)
272
273 def test_header_keep_alive(self):
274 self.con._http_vsn_str = 'HTTP/1.1'
275 self.con.putrequest('GET', '/')
276 self.con.putheader('Connection', 'keep-alive')
277 self.con.endheaders()
278 res = self.con.getresponse()
279 self.assertEqual(res.status, HTTPStatus.NOT_IMPLEMENTED)
280
281 def test_handler(self):
282 self.con.request('TEST', '/')

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected