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

Method test_no_proxy_response_headers

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

Source from the content-addressed store, hash-verified

2555 self.assertIn(expected_header, headers.items())
2556
2557 def test_no_proxy_response_headers(self):
2558 expected_header = ('X-Dummy', '1')
2559 response_text = (
2560 'HTTP/1.0 200 OK\r\n'
2561 '{0}\r\n\r\n'.format(':'.join(expected_header))
2562 )
2563
2564 self.conn._create_connection = self._create_connection(response_text)
2565
2566 self.conn.request('PUT', '/', '')
2567 headers = self.conn.get_proxy_response_headers()
2568 self.assertIsNone(headers)
2569
2570 def test_tunnel_leak(self):
2571 sock = None

Callers

nothing calls this directly

Calls 6

_create_connectionMethod · 0.95
assertIsNoneMethod · 0.80
formatMethod · 0.45
joinMethod · 0.45
requestMethod · 0.45

Tested by

no test coverage detected