(self)
| 2541 | self.assertIn('header: {}'.format(expected_header), lines) |
| 2542 | |
| 2543 | def test_proxy_response_headers(self): |
| 2544 | expected_header = ('X-Dummy', '1') |
| 2545 | response_text = ( |
| 2546 | 'HTTP/1.0 200 OK\r\n' |
| 2547 | '{0}\r\n\r\n'.format(':'.join(expected_header)) |
| 2548 | ) |
| 2549 | |
| 2550 | self.conn._create_connection = self._create_connection(response_text) |
| 2551 | self.conn.set_tunnel('destination.com') |
| 2552 | |
| 2553 | self.conn.request('PUT', '/', '') |
| 2554 | headers = self.conn.get_proxy_response_headers() |
| 2555 | self.assertIn(expected_header, headers.items()) |
| 2556 | |
| 2557 | def test_no_proxy_response_headers(self): |
| 2558 | expected_header = ('X-Dummy', '1') |
nothing calls this directly
no test coverage detected