def test_is_successfull(self): executor = PythonExecutor("/tmp", AmbariConfig().getConfig()) executor.python_process_has_been_killed = False self.assertTrue(executor.isSuccessfull(0)) self.assertFalse(executor.isSuccessfull(1)) executor.python_process_has_been_killed = True self.assertFalse(executor.isSuccessfull(0)) self.assertFalse(executor.isSuccessfull(1))
def test_is_successfull(self): executor = PythonExecutor("/tmp", AgentConfig("", ""), self.agentToggleLogger) executor.python_process_has_been_killed = False self.assertTrue(executor.isSuccessfull(0)) self.assertFalse(executor.isSuccessfull(1)) executor.python_process_has_been_killed = True self.assertFalse(executor.isSuccessfull(0)) self.assertFalse(executor.isSuccessfull(1))