(self)
| 2528 | self.assertIn(b'Host: [1:2:3::4]:1234', self.conn.sock.data) |
| 2529 | |
| 2530 | def test_tunnel_debuglog(self): |
| 2531 | expected_header = 'X-Dummy: 1' |
| 2532 | response_text = 'HTTP/1.0 200 OK\r\n{}\r\n\r\n'.format(expected_header) |
| 2533 | |
| 2534 | self.conn.set_debuglevel(1) |
| 2535 | self.conn._create_connection = self._create_connection(response_text) |
| 2536 | self.conn.set_tunnel('destination.com') |
| 2537 | |
| 2538 | with support.captured_stdout() as output: |
| 2539 | self.conn.request('PUT', '/', '') |
| 2540 | lines = output.getvalue().splitlines() |
| 2541 | self.assertIn('header: {}'.format(expected_header), lines) |
| 2542 | |
| 2543 | def test_proxy_response_headers(self): |
| 2544 | expected_header = ('X-Dummy', '1') |
nothing calls this directly
no test coverage detected