Ejemplo n.º 1
0
def test_move_by_idmap():
    with patch('celery.contrib.migrate.move') as move:
        move_by_idmap({'123f': Queue('foo')})
        move.assert_called()
        cb = move.call_args[0][0]
        body = {'id': '123f'}
        assert cb(body, Message(body))
 def test_move_by_idmap(self):
     with patch('celery.contrib.migrate.move') as move:
         move_by_idmap({'123f': Queue('foo')})
         move.assert_called()
         cb = move.call_args[0][0]
         self.assertTrue(cb({'id': '123f'}, Mock()))
Ejemplo n.º 3
0
 def test_move_by_idmap(self):
     with patch('celery.contrib.migrate.move') as move:
         move_by_idmap({'123f': Queue('foo')})
         self.assertTrue(move.called)
         cb = move.call_args[0][0]
         self.assertTrue(cb({'id': '123f'}, Mock()))
Ejemplo n.º 4
0
def test_move_by_idmap():
    with patch("celery.contrib.migrate.move") as move:
        move_by_idmap({"123f": Queue("foo")})
        move.assert_called()
        cb = move.call_args[0][0]
        assert cb({"id": "123f"}, Mock())
Ejemplo n.º 5
0
def test_move_by_idmap():
    with patch('celery.contrib.migrate.move') as move:
        move_by_idmap({'123f': Queue('foo')})
        move.assert_called()
        cb = move.call_args[0][0]
        assert cb({'id': '123f'}, Mock())