(self)
| 2433 | 'destination.com') |
| 2434 | |
| 2435 | def test_connect_with_tunnel(self): |
| 2436 | d = { |
| 2437 | b'host': b'destination.com', |
| 2438 | b'port': client.HTTP_PORT, |
| 2439 | } |
| 2440 | self.conn.set_tunnel(d[b'host'].decode('ascii')) |
| 2441 | self.conn.request('HEAD', '/', '') |
| 2442 | self.assertEqual(self.conn.sock.host, self.host) |
| 2443 | self.assertEqual(self.conn.sock.port, self.port) |
| 2444 | self.assertIn(b'CONNECT %(host)s:%(port)d HTTP/1.1\r\n' |
| 2445 | b'Host: %(host)s:%(port)d\r\n\r\n' % d, |
| 2446 | self.conn.sock.data) |
| 2447 | self.assertIn(b'HEAD / HTTP/1.1\r\nHost: %(host)s\r\n' % d, |
| 2448 | self.conn.sock.data) |
| 2449 | |
| 2450 | def test_connect_with_tunnel_with_default_port(self): |
| 2451 | d = { |
nothing calls this directly
no test coverage detected