MCPcopy
hub / github.com/aio-libs/aiohttp / test_function_signal_dispatch

Function test_function_signal_dispatch

tests/test_signals.py:53–66  ·  view source on GitHub ↗
(loop, app)

Source from the content-addressed store, hash-verified

51
52
53def test_function_signal_dispatch(loop, app):
54 signal = Signal(app)
55 kwargs = {'foo': 1, 'bar': 2}
56
57 callback_mock = mock.Mock()
58
59 @asyncio.coroutine
60 def callback(**kwargs):
61 callback_mock(**kwargs)
62
63 signal.append(callback)
64
65 loop.run_until_complete(signal.send(**kwargs))
66 callback_mock.assert_called_once_with(**kwargs)
67
68
69def test_function_signal_dispatch2(loop, app):

Callers

nothing calls this directly

Calls 3

sendMethod · 0.95
SignalClass · 0.90
appendMethod · 0.80

Tested by

no test coverage detected