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

Function test_debug_signal

tests/test_signals.py:138–153  ·  view source on GitHub ↗
(loop, debug_app)

Source from the content-addressed store, hash-verified

136
137
138def test_debug_signal(loop, debug_app):
139 assert debug_app.debug, "Should be True"
140 signal = Signal(debug_app)
141
142 callback = mock.Mock()
143 pre = mock.Mock()
144 post = mock.Mock()
145
146 signal.append(callback)
147 debug_app.on_pre_signal.append(pre)
148 debug_app.on_post_signal.append(post)
149
150 loop.run_until_complete(signal.send(1, a=2))
151 callback.assert_called_once_with(1, a=2)
152 pre.assert_called_once_with(1, 'aiohttp.signals:Signal', 1, a=2)
153 post.assert_called_once_with(1, 'aiohttp.signals:Signal', 1, a=2)

Callers

nothing calls this directly

Calls 3

sendMethod · 0.95
SignalClass · 0.90
appendMethod · 0.80

Tested by

no test coverage detected