(self)
| 520 | self.assertEqual(handler.requests, ["/", "/somewhere_else"]) |
| 521 | |
| 522 | def test_chunked(self): |
| 523 | expected_response = b"hello world" |
| 524 | chunked_start = ( |
| 525 | b'a\r\n' |
| 526 | b'hello worl\r\n' |
| 527 | b'1\r\n' |
| 528 | b'd\r\n' |
| 529 | b'0\r\n' |
| 530 | ) |
| 531 | response = [(200, [("Transfer-Encoding", "chunked")], chunked_start)] |
| 532 | handler = self.start_server(response) |
| 533 | data = self.urlopen("http://localhost:%s/" % handler.port) |
| 534 | self.assertEqual(data, expected_response) |
| 535 | |
| 536 | def test_404(self): |
| 537 | expected_response = b"Bad bad bad..." |
nothing calls this directly
no test coverage detected