MCPcopy Create free account
hub / github.com/0x676e67/wreq-python / test_websocket

Function test_websocket

tests/response_test.py:11–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9@pytest.mark.asyncio
10@pytest.mark.flaky(reruns=3, reruns_delay=2)
11async def test_websocket():
12 ws: WebSocket = await client.websocket("wss://echo.websocket.org")
13 await ws.recv()
14 await ws.send(Message.from_text("Hello, World!"))
15 message: Message = await ws.recv()
16 assert message.data == b"Hello, World!"
17 await ws.close()
18
19
20@pytest.mark.asyncio

Callers

nothing calls this directly

Calls 5

from_textMethod · 0.80
websocketMethod · 0.45
recvMethod · 0.45
sendMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected