()
| 9 | @pytest.mark.asyncio |
| 10 | @pytest.mark.flaky(reruns=3, reruns_delay=2) |
| 11 | async 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 |