(self)
| 2497 | msg=f'unexpected proxy data sent {proxy_setup_data_sent!r}') |
| 2498 | |
| 2499 | def test_connect_put_request(self): |
| 2500 | d = { |
| 2501 | b'host': b'destination.com', |
| 2502 | b'port': client.HTTP_PORT, |
| 2503 | } |
| 2504 | self.conn.set_tunnel(d[b'host'].decode('ascii')) |
| 2505 | self.conn.request('PUT', '/', '') |
| 2506 | self.assertEqual(self.conn.sock.host, self.host) |
| 2507 | self.assertEqual(self.conn.sock.port, self.port) |
| 2508 | self.assertIn(b'CONNECT %(host)s:%(port)d HTTP/1.1\r\n' |
| 2509 | b'Host: %(host)s:%(port)d\r\n\r\n' % d, |
| 2510 | self.conn.sock.data) |
| 2511 | self.assertIn(b'PUT / HTTP/1.1\r\nHost: %(host)s\r\n' % d, |
| 2512 | self.conn.sock.data) |
| 2513 | |
| 2514 | def test_connect_put_request_ipv6(self): |
| 2515 | self.conn.set_tunnel('[1:2:3::4]', 1234) |
nothing calls this directly
no test coverage detected