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

Method _expect

tests/async/test_admin.py:91–101  ·  view source on GitHub ↗
(self, expected, admin_client)

Source from the content-addressed store, hash-verified

89 assert self.thread_count == threading.active_count()
90
91 def _expect(self, expected, admin_client):
92 events = {}
93 while expected:
94 data = admin_client.receive(timeout=5)
95 if data[0] in expected:
96 if expected[data[0]] == 1:
97 events[data[0]] = data[1]
98 del expected[data[0]]
99 else:
100 expected[data[0]] -= 1
101 return events
102
103 def test_missing_auth(self):
104 sio = socketio.AsyncServer(async_mode='asgi')

Calls 1

receiveMethod · 0.45

Tested by

no test coverage detected