(self)
| 2585 | self.assertIn('header: {}'.format(expected_header), lines) |
| 2586 | |
| 2587 | def test_proxy_response_headers(self): |
| 2588 | expected_header = ('X-Dummy', '1') |
| 2589 | response_text = ( |
| 2590 | 'HTTP/1.0 200 OK\r\n' |
| 2591 | '{0}\r\n\r\n'.format(':'.join(expected_header)) |
| 2592 | ) |
| 2593 | |
| 2594 | self.conn._create_connection = self._create_connection(response_text) |
| 2595 | self.conn.set_tunnel('destination.com') |
| 2596 | |
| 2597 | self.conn.request('PUT', '/', '') |
| 2598 | headers = self.conn.get_proxy_response_headers() |
| 2599 | self.assertIn(expected_header, headers.items()) |
| 2600 | |
| 2601 | def test_no_proxy_response_headers(self): |
| 2602 | expected_header = ('X-Dummy', '1') |
nothing calls this directly
no test coverage detected