Exemple #1
0
 def test_insert_runner(self):
     queue_insert = MagicMock(return_value=True)
     with patch.object(queue_mod, "insert", queue_insert):
         queue_mod.insert_runner("test.stdout_print", queue="salt")
     expected_call = {
         "queue": "salt",
         "items": {"fun": "test.stdout_print", "args": [], "kwargs": {}},
         "backend": "pgjsonb",
     }
     queue_insert.assert_called_once_with(**expected_call)
Exemple #2
0
 def test_insert_runner(self):
     queue_insert = MagicMock(return_value=True)
     with patch.object(queue_mod, 'insert', queue_insert):
         queue_mod.insert_runner('test.stdout_print', queue='salt')
     expected_call = {
         'queue': 'salt',
         'items': {
             'fun': 'test.stdout_print',
             'args': [],
             'kwargs': {},
         },
         'backend': 'pgjsonb',
     }
     queue_insert.assert_called_once_with(**expected_call)