(self)
| 1084 | |
| 1085 | |
| 1086 | def test_send_iter(self): |
| 1087 | expected = b'GET /foo HTTP/1.1\r\nHost: example.com\r\n' \ |
| 1088 | b'Accept-Encoding: identity\r\nContent-Length: 11\r\n' \ |
| 1089 | b'\r\nonetwothree' |
| 1090 | |
| 1091 | def body(): |
| 1092 | yield b"one" |
| 1093 | yield b"two" |
| 1094 | yield b"three" |
| 1095 | |
| 1096 | conn = client.HTTPConnection('example.com') |
| 1097 | sock = FakeSocket("") |
| 1098 | conn.sock = sock |
| 1099 | conn.request('GET', '/foo', body(), {'Content-Length': '11'}) |
| 1100 | self.assertEqual(sock.data, expected) |
| 1101 | |
| 1102 | def test_blocksize_request(self): |
| 1103 | """Check that request() respects the configured block size.""" |
nothing calls this directly
no test coverage detected