MCPcopy Index your code
hub / github.com/celery/celery / setup_method

Method setup_method

t/unit/worker/test_worker.py:705–715  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

703class test_WorkController(ConsumerCase):
704
705 def setup_method(self):
706 self.worker = self.create_worker()
707 self._logger = worker_module.logger
708 self._comp_logger = components.logger
709 self.logger = worker_module.logger = Mock()
710 self.comp_logger = components.logger = Mock()
711
712 @self.app.task(shared=False)
713 def foo_task(x, y, z):
714 return x * y * z
715 self.foo_task = foo_task
716
717 def teardown_method(self):
718 worker_module.logger = self._logger

Callers

nothing calls this directly

Calls 1

create_workerMethod · 0.95

Tested by

no test coverage detected