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

Method test_call

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

Source from the content-addressed store, hash-verified

182 )
183
184 async def test_call(self, eio):
185 mgr = self._get_mock_manager()
186 s = async_server.AsyncServer(client_manager=mgr)
187
188 async def fake_event_wait():
189 s.manager.emit.await_args_list[0][1]['callback']('foo', 321)
190 return True
191
192 s.eio.create_event.return_value.wait = fake_event_wait
193 assert await s.call('foo', sid='123') == ('foo', 321)
194
195 async def test_call_with_timeout(self, eio):
196 mgr = self._get_mock_manager()

Callers

nothing calls this directly

Calls 2

_get_mock_managerMethod · 0.95
callMethod · 0.95

Tested by

no test coverage detected