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

Method test_execute_fail

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

Source from the content-addressed store, hash-verified

2108 assert meta['status'] == states.SUCCESS
2109
2110 def test_execute_fail(self):
2111 tid = uuid()
2112 job = self.xRequest(
2113 name=self.mytask_raising.name,
2114 id=tid,
2115 args=[4],
2116 kwargs={},
2117 )
2118 assert isinstance(job.execute(), ExceptionInfo)
2119 assert self.mytask_raising.backend.serializer == 'pickle'
2120 meta = self.mytask_raising.backend.get_task_meta(tid)
2121 assert meta['status'] == states.FAILURE
2122 assert isinstance(meta['result'], KeyError)
2123
2124 def test_execute_using_pool(self):
2125 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