MCPcopy Create free account
hub / github.com/miguelgrinberg/python-socketio / test_send_packet

Method test_send_packet

tests/async/test_server.py:273–280  ·  view source on GitHub ↗
(self, eio)

Source from the content-addressed store, hash-verified

271 s.eio.handle_request.assert_awaited_once_with('environ')
272
273 async def test_send_packet(self, eio):
274 eio.return_value.send = mock.AsyncMock()
275 s = async_server.AsyncServer()
276 await s._send_packet('123', packet.Packet(
277 packet.EVENT, ['my event', 'my data'], namespace='/foo'))
278 s.eio.send.assert_awaited_once_with(
279 '123', '2/foo,["my event","my data"]'
280 )
281
282 async def test_send_eio_packet(self, eio):
283 eio.return_value.send = mock.AsyncMock()

Callers

nothing calls this directly

Calls 1

_send_packetMethod · 0.95

Tested by

no test coverage detected