MCPcopy Create free account
hub / github.com/aio-libs/aiohttp / test_nonstarted_send_json_bytes

Function test_nonstarted_send_json_bytes

tests/test_web_websocket.py:218–223  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

216
217
218async def test_nonstarted_send_json_bytes() -> None:
219 ws = web.WebSocketResponse()
220 with pytest.raises(RuntimeError):
221 await ws.send_json_bytes(
222 {"type": "json"}, dumps=lambda x: json.dumps(x).encode("utf-8")
223 )
224
225
226async def test_send_json_bytes_nonjson(make_request: _RequestMaker) -> None:

Callers

nothing calls this directly

Calls 2

send_json_bytesMethod · 0.95
encodeMethod · 0.80

Tested by

no test coverage detected