(self)
| 477 | self.assertNotIn('content-length', [k.lower() for k in headers]) |
| 478 | |
| 479 | def test_empty_body(self): |
| 480 | # Zero-length iterable should be treated like any other iterable |
| 481 | conn = client.HTTPConnection('example.com') |
| 482 | conn.sock = FakeSocket(b'') |
| 483 | conn.request('POST', '/', ()) |
| 484 | _, headers, body = self._parse_request(conn.sock.data) |
| 485 | self.assertEqual(headers['Transfer-Encoding'], 'chunked') |
| 486 | self.assertNotIn('content-length', [k.lower() for k in headers]) |
| 487 | self.assertEqual(body, b"0\r\n\r\n") |
| 488 | |
| 489 | def _make_body(self, empty_lines=False): |
| 490 | lines = self.expected_body.split(b' ') |
nothing calls this directly
no test coverage detected