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

Method test_execute_ack

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

Source from the content-addressed store, hash-verified

2094 assert meta['status'] == states.SUCCESS
2095
2096 def test_execute_ack(self):
2097 scratch = {'ACK': False}
2098
2099 def on_ack(*args, **kwargs):
2100 scratch['ACK'] = True
2101
2102 tid = uuid()
2103 job = self.xRequest(id=tid, args=[4], on_ack=on_ack)
2104 assert job.execute() == 256
2105 meta = self.mytask.backend.get_task_meta(tid)
2106 assert scratch['ACK']
2107 assert meta['result'] == 256
2108 assert meta['status'] == states.SUCCESS
2109
2110 def test_execute_fail(self):
2111 tid = uuid()

Callers

nothing calls this directly

Calls 3

xRequestMethod · 0.80
executeMethod · 0.45
get_task_metaMethod · 0.45

Tested by

no test coverage detected