| 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): |