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

Method test_execute_using_pool

t/unit/worker/test_request.py:2124–2136  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2122 assert isinstance(meta['result'], KeyError)
2123
2124 def test_execute_using_pool(self):
2125 tid = uuid()
2126 job = self.xRequest(id=tid, args=[4])
2127 p = Mock()
2128 job.execute_using_pool(p)
2129 p.apply_async.assert_called_once()
2130 trace = p.apply_async.call_args[0][0]
2131 assert trace == trace_task_ret
2132 args = p.apply_async.call_args[1]['args']
2133 assert args[0] == self.mytask.name
2134 assert args[1] == tid
2135 assert args[2] == job.request_dict
2136 assert args[3] == job.message.body
2137
2138 def test_execute_using_pool_fast_trace_task(self):
2139 self.app.use_fast_trace_task = True

Callers

nothing calls this directly

Calls 2

xRequestMethod · 0.80
execute_using_poolMethod · 0.80

Tested by

no test coverage detected