(srv)
| 38 | |
| 39 | |
| 40 | def test_handle_request(srv): |
| 41 | transport = mock.Mock() |
| 42 | |
| 43 | srv.connection_made(transport) |
| 44 | srv.writer = mock.Mock() |
| 45 | |
| 46 | message = mock.Mock() |
| 47 | message.headers = [] |
| 48 | message.version = (1, 1) |
| 49 | srv.handle_request(message, mock.Mock()) |
| 50 | |
| 51 | content = b''.join( |
| 52 | [c[1][0] for c in list(srv.writer.write.mock_calls)]) |
| 53 | assert content.startswith(b'HTTP/1.1 404 Not Found\r\n') |
| 54 | |
| 55 | |
| 56 | def test_closing(srv): |
nothing calls this directly
no test coverage detected