(tctx)
| 201 | |
| 202 | @pytest.fixture() |
| 203 | def ws_testdata(tctx): |
| 204 | tctx.server.address = ("example.com", 80) |
| 205 | tctx.server.state = ConnectionState.OPEN |
| 206 | flow = HTTPFlow(tctx.client, tctx.server) |
| 207 | flow.request = Request.make( |
| 208 | "GET", |
| 209 | "http://example.com/", |
| 210 | headers={ |
| 211 | "Connection": "upgrade", |
| 212 | "Upgrade": "websocket", |
| 213 | "Sec-WebSocket-Version": "13", |
| 214 | }, |
| 215 | ) |
| 216 | flow.response = Response.make( |
| 217 | 101, |
| 218 | headers={ |
| 219 | "Connection": "upgrade", |
| 220 | "Upgrade": "websocket", |
| 221 | }, |
| 222 | ) |
| 223 | flow.websocket = WebSocketData() |
| 224 | return tctx, Playbook(websocket.WebsocketLayer(tctx, flow)), flow |
| 225 | |
| 226 | |
| 227 | def test_modify_message(ws_testdata): |
nothing calls this directly
no test coverage detected
searching dependent graphs…