(self)
| 1036 | r"got more than \d+ headers", r.begin) |
| 1037 | |
| 1038 | def test_send_file(self): |
| 1039 | expected = (b'GET /foo HTTP/1.1\r\nHost: example.com\r\n' |
| 1040 | b'Accept-Encoding: identity\r\n' |
| 1041 | b'Transfer-Encoding: chunked\r\n' |
| 1042 | b'\r\n') |
| 1043 | |
| 1044 | with open(__file__, 'rb') as body: |
| 1045 | conn = client.HTTPConnection('example.com') |
| 1046 | sock = FakeSocket(body) |
| 1047 | conn.sock = sock |
| 1048 | conn.request('GET', '/foo', body) |
| 1049 | self.assertStartsWith(sock.data, expected) |
| 1050 | |
| 1051 | def test_send(self): |
| 1052 | expected = b'this is a test this is only a test' |
nothing calls this directly
no test coverage detected