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

Method _make_body

Lib/test/test_httplib.py:535–544  ·  view source on GitHub ↗
(self, empty_lines=False)

Source from the content-addressed store, hash-verified

533 self.assertEqual(body, b"0\r\n\r\n")
534
535 def _make_body(self, empty_lines=False):
536 lines = self.expected_body.split(b' ')
537 for idx, line in enumerate(lines):
538 # for testing handling empty lines
539 if empty_lines and idx % 2:
540 yield b''
541 if idx < len(lines) - 1:
542 yield line + b' '
543 else:
544 yield line
545
546 def _parse_request(self, data):
547 lines = data.split(b'\r\n')

Callers 3

test_explicit_headersMethod · 0.95
test_requestMethod · 0.95

Calls 2

enumerateFunction · 0.85
splitMethod · 0.45

Tested by

no test coverage detected