MCPcopy
hub / github.com/celery/celery / test_propagates_for_parent

Method test_propagates_for_parent

t/unit/tasks/test_result.py:146–158  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

144 assert len(x.children) == 3
145
146 def test_propagates_for_parent(self):
147 x = self.app.AsyncResult(uuid())
148 x.backend = Mock(name='backend')
149 x.backend.get_task_meta.return_value = {}
150 x.backend.wait_for_pending.return_value = 84
151 x.parent = EagerResult(uuid(), KeyError('foo'), states.FAILURE)
152 with pytest.raises(KeyError):
153 x.get(propagate=True)
154 x.backend.wait_for_pending.assert_not_called()
155
156 x.parent = EagerResult(uuid(), 42, states.SUCCESS)
157 assert x.get(propagate=True) == 84
158 x.backend.wait_for_pending.assert_called()
159
160 def test_get_children(self):
161 tid = uuid()

Callers

nothing calls this directly

Calls 4

getMethod · 0.95
EagerResultClass · 0.90
AsyncResultMethod · 0.45
raisesMethod · 0.45

Tested by

no test coverage detected