(self)
| 2541 | msg=f'unexpected proxy data sent {proxy_setup_data_sent!r}') |
| 2542 | |
| 2543 | def test_connect_put_request(self): |
| 2544 | d = { |
| 2545 | b'host': b'destination.com', |
| 2546 | b'port': client.HTTP_PORT, |
| 2547 | } |
| 2548 | self.conn.set_tunnel(d[b'host'].decode('ascii')) |
| 2549 | self.conn.request('PUT', '/', '') |
| 2550 | self.assertEqual(self.conn.sock.host, self.host) |
| 2551 | self.assertEqual(self.conn.sock.port, self.port) |
| 2552 | self.assertIn(b'CONNECT %(host)s:%(port)d HTTP/1.1\r\n' |
| 2553 | b'Host: %(host)s:%(port)d\r\n\r\n' % d, |
| 2554 | self.conn.sock.data) |
| 2555 | self.assertIn(b'PUT / HTTP/1.1\r\nHost: %(host)s\r\n' % d, |
| 2556 | self.conn.sock.data) |
| 2557 | |
| 2558 | def test_connect_put_request_ipv6(self): |
| 2559 | self.conn.set_tunnel('[1:2:3::4]', 1234) |
nothing calls this directly
no test coverage detected