def test_ActionQueueStartStop(self, CustomServiceOrchestrator_mock, get_mock, process_command_mock): CustomServiceOrchestrator_mock.return_value = None dummy_controller = MagicMock() config = MagicMock() actionQueue = ActionQueue(config, dummy_controller) actionQueue.start() time.sleep(3) actionQueue.stop() actionQueue.join() self.assertEqual(actionQueue.stopped(), True, 'Action queue is not stopped.') self.assertTrue(process_command_mock.call_count > 1)
def test_ActionQueueStartStop(self, CustomServiceOrchestrator_mock, get_mock, process_command_mock): CustomServiceOrchestrator_mock.return_value = None dummy_controller = MagicMock() config = MagicMock() actionQueue = ActionQueue(config, dummy_controller, self.agentToggleLogger) actionQueue.start() time.sleep(3) actionQueue.stop() actionQueue.join() self.assertEqual(actionQueue.stopped(), True, 'Action queue is not stopped.') self.assertTrue(process_command_mock.call_count > 1)