MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_proxy_response_headers

Method test_proxy_response_headers

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

Source from the content-addressed store, hash-verified

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

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