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()))
예제 #2
0
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())
예제 #3
0
 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()))
예제 #4
0
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())