MCPcopy
hub / github.com/celery/celery / test_run

Method test_run

t/unit/tasks/test_chord.py:373–381  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

371
372 @patch('celery.Celery.backend', new=PropertyMock(name='backend'))
373 def test_run(self):
374 self.app.backend.cleanup = Mock()
375 self.app.backend.cleanup.__name__ = 'cleanup'
376 Chord = self.app.tasks['celery.chord']
377
378 body = self.add.signature()
379 Chord(group(self.add.signature((i, i)) for i in range(5)), body)
380 Chord([self.add.signature((j, j)) for j in range(5)], body)
381 assert self.app.backend.apply_chord.call_count == 2
382
383 @patch('celery.Celery.backend', new=PropertyMock(name='backend'))
384 def test_run__chord_size_set(self):

Callers

nothing calls this directly

Calls 2

groupClass · 0.90
signatureMethod · 0.45

Tested by

no test coverage detected