(self)
| 990 | r"got more than \d+ headers", r.begin) |
| 991 | |
| 992 | def test_send_file(self): |
| 993 | expected = (b'GET /foo HTTP/1.1\r\nHost: example.com\r\n' |
| 994 | b'Accept-Encoding: identity\r\n' |
| 995 | b'Transfer-Encoding: chunked\r\n' |
| 996 | b'\r\n') |
| 997 | |
| 998 | with open(__file__, 'rb') as body: |
| 999 | conn = client.HTTPConnection('example.com') |
| 1000 | sock = FakeSocket(body) |
| 1001 | conn.sock = sock |
| 1002 | conn.request('GET', '/foo', body) |
| 1003 | self.assertStartsWith(sock.data, expected) |
| 1004 | |
| 1005 | def test_send(self): |
| 1006 | expected = b'this is a test this is only a test' |
nothing calls this directly
no test coverage detected