MCPcopy
hub / github.com/celery/celery / test_apply

Method test_apply

t/unit/tasks/test_canvas.py:355–368  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

353class test_xmap_xstarmap(CanvasCase):
354
355 def test_apply(self):
356 for type, attr in [(xmap, 'map'), (xstarmap, 'starmap')]:
357 args = [(i, i) for i in range(10)]
358 s = getattr(self.add, attr)(args)
359 s.type = Mock()
360
361 s.apply_async(foo=1)
362 s.type.apply_async.assert_called_with(
363 (), {'task': self.add.s(), 'it': args}, foo=1,
364 route_name=self.add.name,
365 )
366
367 assert type.from_dict(dict(s)) == s
368 assert repr(s)
369
370
371class test_chunks(CanvasCase):

Callers

nothing calls this directly

Calls 3

apply_asyncMethod · 0.45
sMethod · 0.45
from_dictMethod · 0.45

Tested by

no test coverage detected