(ws_testdata)
| 332 | |
| 333 | |
| 334 | def test_ping(ws_testdata): |
| 335 | tctx, playbook, flow = ws_testdata |
| 336 | assert ( |
| 337 | playbook |
| 338 | << websocket.WebsocketStartHook(flow) |
| 339 | >> reply() |
| 340 | >> DataReceived(tctx.client, masked_bytes(b"\x89\x11ping-with-payload")) |
| 341 | << Log("Received WebSocket ping from client (payload: b'ping-with-payload')") |
| 342 | << SendData(tctx.server, masked(b"\x89\x11ping-with-payload")) |
| 343 | >> DataReceived(tctx.server, b"\x8a\x11pong-with-payload") |
| 344 | << Log("Received WebSocket pong from server (payload: b'pong-with-payload')") |
| 345 | << SendData(tctx.client, b"\x8a\x11pong-with-payload") |
| 346 | ) |
| 347 | assert not flow.websocket.messages |
| 348 | |
| 349 | |
| 350 | def test_close_normal(ws_testdata): |
nothing calls this directly
no test coverage detected
searching dependent graphs…