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

Function make_request

tests/test_server.py:31–44  ·  view source on GitHub ↗

Generate a handshake request that can be altered for testing.

()

Source from the content-addressed store, hash-verified

29
30
31def make_request():
32 """Generate a handshake request that can be altered for testing."""
33 return Request(
34 path="/test",
35 headers=Headers(
36 {
37 "Host": "example.com",
38 "Upgrade": "websocket",
39 "Connection": "Upgrade",
40 "Sec-WebSocket-Key": KEY,
41 "Sec-WebSocket-Version": "13",
42 }
43 ),
44 )
45
46
47@patch("email.utils.formatdate", return_value=DATE)

Callers 15

test_accept_responseMethod · 0.85
test_unexpected_errorMethod · 0.85
test_basicMethod · 0.85
test_missing_upgradeMethod · 0.85
test_invalid_upgradeMethod · 0.85
test_missing_keyMethod · 0.85
test_multiple_keyMethod · 0.85
test_invalid_keyMethod · 0.85

Calls 2

RequestClass · 0.90
HeadersClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…