def test_move_by_taskmap(self): with patch('celery.contrib.migrate.move') as move: move_by_taskmap({'add': Queue('foo')}) move.assert_called() cb = move.call_args[0][0] self.assertTrue(cb({'task': 'add'}, Mock()))
def test_move_by_taskmap(): with patch("celery.contrib.migrate.move") as move: move_by_taskmap({"add": Queue("foo")}) move.assert_called() cb = move.call_args[0][0] assert cb({"task": "add"}, Mock())
def test_move_by_taskmap(self): with patch('celery.contrib.migrate.move') as move: move_by_taskmap({'add': Queue('foo')}) self.assertTrue(move.called) cb = move.call_args[0][0] self.assertTrue(cb({'task': 'add'}, Mock()))
def test_move_by_taskmap(): with patch('celery.contrib.migrate.move') as move: move_by_taskmap({'add': Queue('foo')}) move.assert_called() cb = move.call_args[0][0] assert cb({'task': 'add'}, Mock())