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

Method test_endheaders_chunked

Lib/test/test_httplib.py:461–469  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

459 expected_body = b"It's just a flesh wound"
460
461 def test_endheaders_chunked(self):
462 conn = client.HTTPConnection('example.com')
463 conn.sock = FakeSocket(b'')
464 conn.putrequest('POST', '/')
465 conn.endheaders(self._make_body(), encode_chunked=True)
466
467 _, _, body = self._parse_request(conn.sock.data)
468 body = self._parse_chunked(body)
469 self.assertEqual(body, self.expected_body)
470
471 def test_explicit_headers(self):
472 # explicit chunked

Callers

nothing calls this directly

Calls 7

putrequestMethod · 0.95
endheadersMethod · 0.95
_make_bodyMethod · 0.95
_parse_requestMethod · 0.95
_parse_chunkedMethod · 0.95
FakeSocketClass · 0.70
assertEqualMethod · 0.45

Tested by

no test coverage detected