(ws_testdata)
| 308 | |
| 309 | |
| 310 | def test_protocol_error(ws_testdata): |
| 311 | tctx, playbook, flow = ws_testdata |
| 312 | assert ( |
| 313 | playbook |
| 314 | << websocket.WebsocketStartHook(flow) |
| 315 | >> reply() |
| 316 | >> DataReceived(tctx.server, b"\x01\x03foo") |
| 317 | >> DataReceived(tctx.server, b"\x02\x03bar") |
| 318 | << SendData( |
| 319 | tctx.server, |
| 320 | masked(b"\x88/\x03\xeaexpected CONTINUATION, got <Opcode.BINARY: 2>"), |
| 321 | ) |
| 322 | << CloseConnection(tctx.server) |
| 323 | << SendData( |
| 324 | tctx.client, b"\x88/\x03\xeaexpected CONTINUATION, got <Opcode.BINARY: 2>" |
| 325 | ) |
| 326 | << CloseConnection(tctx.client) |
| 327 | << websocket.WebsocketEndHook(flow) |
| 328 | >> reply() |
| 329 | ) |
| 330 | assert not flow.websocket.messages |
| 331 | assert not flow.live |
| 332 | |
| 333 | |
| 334 | def test_ping(ws_testdata): |
nothing calls this directly
no test coverage detected
searching dependent graphs…