MCPcopy Create free account
hub / github.com/celery/celery / test_disable_events

Method test_disable_events

t/unit/worker/test_control.py:213–221  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

211 assert 'already enabled' in panel.handle('enable_events')['ok']
212
213 def test_disable_events(self):
214 consumer = Consumer(self.app)
215 panel = self.create_panel(consumer=consumer)
216 evd = consumer.event_dispatcher
217 evd.enabled = True
218 evd.groups = {'task'}
219 panel.handle('disable_events')
220 assert 'task' not in evd.groups
221 assert 'already disabled' in panel.handle('disable_events')['ok']
222
223 def test_enable_events_no_dispatcher(self):
224 consumer = Consumer(self.app)

Callers

nothing calls this directly

Calls 3

create_panelMethod · 0.95
ConsumerClass · 0.70
handleMethod · 0.45

Tested by

no test coverage detected