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

Method test_process_task

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

Source from the content-addressed store, hash-verified

1390 assert 'Next ETA %s secs' in fmt
1391
1392 def test_process_task(self):
1393 worker = self.worker
1394 worker.pool = Mock()
1395 channel = Mock()
1396 m = self.create_task_message(
1397 channel, self.foo_task.name,
1398 args=[4, 8, 10], kwargs={},
1399 )
1400 task = Request(m, app=self.app)
1401 worker._process_task(task)
1402 assert worker.pool.apply_async.call_count == 1
1403 worker.pool.stop()
1404
1405 def test_process_task_raise_base(self):
1406 worker = self.worker

Callers

nothing calls this directly

Calls 4

RequestClass · 0.90
_process_taskMethod · 0.80
create_task_messageMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected