WebSocket Plugins¶
AsyncWebSocketPlugin¶
AsyncWebSocketPlugin
¶
Bases: StateMachinePlugin
Async WebSocket interception plugin.
Patches websockets.connect at the module level. Uses reference counting so nested sandboxes work correctly.
States: connecting -> open -> closed
Source code in src/bigfoot/plugins/websocket_plugin.py
activate
¶
Reference-counted class-level patch installation.
Source code in src/bigfoot/plugins/websocket_plugin.py
matches
¶
Field-by-field comparison with dirty-equals support.
Source code in src/bigfoot/plugins/websocket_plugin.py
assertable_fields
¶
Return assertable fields for each step type.
Source code in src/bigfoot/plugins/websocket_plugin.py
assert_connect
¶
Assert the next async websocket connect interaction.
Source code in src/bigfoot/plugins/websocket_plugin.py
assert_send
¶
Assert the next async websocket send interaction.
Source code in src/bigfoot/plugins/websocket_plugin.py
assert_recv
¶
Assert the next async websocket recv interaction.
Source code in src/bigfoot/plugins/websocket_plugin.py
assert_close
¶
Assert the next async websocket close interaction.
Source code in src/bigfoot/plugins/websocket_plugin.py
SyncWebSocketPlugin¶
SyncWebSocketPlugin
¶
Bases: StateMachinePlugin
Sync WebSocket interception plugin (websocket-client library).
Patches websocket.create_connection at the module level. Uses reference counting so nested sandboxes work correctly.
States: connecting -> open -> closed
Source code in src/bigfoot/plugins/websocket_plugin.py
activate
¶
Reference-counted class-level patch installation.
Source code in src/bigfoot/plugins/websocket_plugin.py
matches
¶
Field-by-field comparison with dirty-equals support.
Source code in src/bigfoot/plugins/websocket_plugin.py
assertable_fields
¶
Return assertable fields for each step type.
Source code in src/bigfoot/plugins/websocket_plugin.py
assert_connect
¶
Assert the next sync websocket connect interaction.
Source code in src/bigfoot/plugins/websocket_plugin.py
assert_send
¶
Assert the next sync websocket send interaction.
Source code in src/bigfoot/plugins/websocket_plugin.py
assert_recv
¶
Assert the next sync websocket recv interaction.
Source code in src/bigfoot/plugins/websocket_plugin.py
assert_close
¶
Assert the next sync websocket close interaction.