MCPcopy Index your code
hub / github.com/python/cpython / test_proxy_response_headers

Method test_proxy_response_headers

Lib/test/test_httplib.py:2587–2599  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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')

Callers

nothing calls this directly

Calls 8

_create_connectionMethod · 0.95
assertInMethod · 0.80
formatMethod · 0.45
joinMethod · 0.45
set_tunnelMethod · 0.45
requestMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected