(self)
| 2572 | self.assertIn(b'Host: [1:2:3::4]:1234', self.conn.sock.data) |
| 2573 | |
| 2574 | def test_tunnel_debuglog(self): |
| 2575 | expected_header = 'X-Dummy: 1' |
| 2576 | response_text = 'HTTP/1.0 200 OK\r\n{}\r\n\r\n'.format(expected_header) |
| 2577 | |
| 2578 | self.conn.set_debuglevel(1) |
| 2579 | self.conn._create_connection = self._create_connection(response_text) |
| 2580 | self.conn.set_tunnel('destination.com') |
| 2581 | |
| 2582 | with support.captured_stdout() as output: |
| 2583 | self.conn.request('PUT', '/', '') |
| 2584 | lines = output.getvalue().splitlines() |
| 2585 | self.assertIn('header: {}'.format(expected_header), lines) |
| 2586 | |
| 2587 | def test_proxy_response_headers(self): |
| 2588 | expected_header = ('X-Dummy', '1') |
nothing calls this directly
no test coverage detected