def test_dmap_async(self): from celery import conf import operator conf.ALWAYS_EAGER = True res = task.dmap_async(operator.add, zip(xrange(10), xrange(10))) self.assertEqual(sum(res.get()), sum(operator.add(x, x) for x in xrange(10))) conf.ALWAYS_EAGER = False
def test_dmap_async(self): import operator res = task.dmap_async(operator.add, zip(xrange(10), xrange(10))) self.assertEqual(sum(res.get()), sum(operator.add(x, x) for x in xrange(10)))