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

Method test_send

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

Source from the content-addressed store, hash-verified

152 )
153
154 def test_send(self, eio):
155 mgr = mock.MagicMock()
156 s = server.Server(client_manager=mgr)
157 s.send(
158 'foo', to='room', skip_sid='123', namespace='/foo', callback='cb'
159 )
160 s.manager.emit.assert_called_once_with(
161 'message',
162 'foo',
163 '/foo',
164 room='room',
165 skip_sid='123',
166 callback='cb',
167 ignore_queue=False,
168 )
169 s.send(
170 'foo', room='room',
171 skip_sid='123',
172 namespace='/foo',
173 callback='cb',
174 ignore_queue=True,
175 )
176 s.manager.emit.assert_called_with(
177 'message',
178 'foo',
179 '/foo',
180 room='room',
181 skip_sid='123',
182 callback='cb',
183 ignore_queue=True,
184 )
185
186 def test_call(self, eio):
187 mgr = mock.MagicMock()

Callers

nothing calls this directly

Calls 1

sendMethod · 0.95

Tested by

no test coverage detected