(self)
| 523 | self.assertNotIn('content-length', [k.lower() for k in headers]) |
| 524 | |
| 525 | def test_empty_body(self): |
| 526 | # Zero-length iterable should be treated like any other iterable |
| 527 | conn = client.HTTPConnection('example.com') |
| 528 | conn.sock = FakeSocket(b'') |
| 529 | conn.request('POST', '/', ()) |
| 530 | _, headers, body = self._parse_request(conn.sock.data) |
| 531 | self.assertEqual(headers['Transfer-Encoding'], 'chunked') |
| 532 | self.assertNotIn('content-length', [k.lower() for k in headers]) |
| 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' ') |
nothing calls this directly
no test coverage detected