(ws_testdata)
| 395 | |
| 396 | |
| 397 | def test_close_code(ws_testdata): |
| 398 | tctx, playbook, flow = ws_testdata |
| 399 | assert ( |
| 400 | playbook |
| 401 | << websocket.WebsocketStartHook(flow) |
| 402 | >> reply() |
| 403 | >> DataReceived(tctx.server, b"\x88\x02\x0f\xa0") |
| 404 | << SendData(tctx.server, masked(b"\x88\x02\x0f\xa0")) |
| 405 | << CloseConnection(tctx.server) |
| 406 | << SendData(tctx.client, b"\x88\x02\x0f\xa0") |
| 407 | << CloseConnection(tctx.client) |
| 408 | << websocket.WebsocketEndHook(flow) |
| 409 | >> reply() |
| 410 | ) |
| 411 | assert flow.websocket.close_code == 4000 |
| 412 | assert not flow.live |
| 413 | |
| 414 | |
| 415 | def test_deflate(ws_testdata): |
nothing calls this directly
no test coverage detected
searching dependent graphs…