MCPcopy Index your code
hub / github.com/python-websockets/websockets / test_prepare_connect_request

Method test_prepare_connect_request

tests/test_proxy.py:217–223  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

215 self.assertEqual(get_proxy(parse_uri(uri)), proxy)
216
217 def test_prepare_connect_request(self):
218 for environ, uri, request in CONNECT_REQUESTS:
219 with patch.dict(os.environ, environ):
220 with self.subTest(environ=environ, uri=uri):
221 uri = parse_uri(uri)
222 proxy = parse_proxy(get_proxy(uri))
223 self.assertEqual(prepare_connect_request(proxy, uri), request)
224
225 def test_prepare_connect_request_with_user_agent(self):
226 for user_agent_header, request in CONNECT_REQUESTS_WITH_USER_AGENT:

Callers

nothing calls this directly

Calls 4

parse_uriFunction · 0.90
prepare_connect_requestFunction · 0.90
parse_proxyFunction · 0.85
get_proxyFunction · 0.85

Tested by

no test coverage detected