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

Method test_call

tests/common/test_server.py:186–196  ·  view source on GitHub ↗
(self, eio)

Source from the content-addressed store, hash-verified

184 )
185
186 def test_call(self, eio):
187 mgr = mock.MagicMock()
188 s = server.Server(client_manager=mgr)
189
190 def fake_event_wait(timeout=None):
191 assert timeout == 60
192 s.manager.emit.call_args_list[0][1]['callback']('foo', 321)
193 return True
194
195 s.eio.create_event.return_value.wait = fake_event_wait
196 assert s.call('foo', sid='123') == ('foo', 321)
197
198 def test_call_with_timeout(self, eio):
199 mgr = mock.MagicMock()

Callers

nothing calls this directly

Calls 1

callMethod · 0.95

Tested by

no test coverage detected