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

Method test_replace

t/unit/tasks/test_tasks.py:1415–1426  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1413 assert sig1.options['header'] == 'value'
1414
1415 def test_replace(self):
1416 sig1 = MagicMock(name='sig1')
1417 sig1.options = {}
1418 self.mytask.request.id = sentinel.request_id
1419 with pytest.raises(Ignore):
1420 self.mytask.replace(sig1)
1421 sig1.freeze.assert_called_once_with(self.mytask.request.id)
1422 sig1.set.assert_called_once_with(replaced_task_nesting=1,
1423 chord=ANY,
1424 group_id=ANY,
1425 group_index=ANY,
1426 root_id=ANY)
1427
1428 def test_replace_with_chord(self):
1429 sig1 = Mock(name='sig1')

Callers

nothing calls this directly

Calls 2

raisesMethod · 0.80
replaceMethod · 0.45

Tested by

no test coverage detected