def test_python_command(self):
   executor = PythonExecutor("/tmp", AmbariConfig().getConfig())
   command = executor.python_command("script", ["script_param1"])
   self.assertEqual(3, len(command))
   self.assertTrue("python" in command[0].lower())
   self.assertEquals("script", command[1])
   self.assertEquals("script_param1", command[2])
예제 #2
0
 def test_python_command(self):
     executor = PythonExecutor("/tmp", AmbariConfig().getConfig())
     command = executor.python_command("script", ["script_param1"])
     self.assertEqual(3, len(command))
     self.assertTrue("python" in command[0])
     self.assertEquals("script", command[1])
     self.assertEquals("script_param1", command[2])
 def test_python_command(self):
   executor = PythonExecutor("/tmp", AgentConfig("", ""), self.agentToggleLogger)
   command = executor.python_command("script", ["script_param1"])
   self.assertEqual(4, len(command))
   self.assertTrue("python" in command[0].lower(), "Looking for python in %s" % (command[0].lower()))
   self.assertEquals("-S", command[1])
   self.assertEquals("script", command[2])
   self.assertEquals("script_param1", command[3])
예제 #4
0
 def test_python_command(self):
     executor = PythonExecutor("/tmp", AgentConfig("", ""))
     command = executor.python_command("script", ["script_param1"])
     self.assertEqual(4, len(command))
     self.assertTrue("python" in command[0])
     self.assertEquals("-S", command[1])
     self.assertEquals("script", command[2])
     self.assertEquals("script_param1", command[3])
예제 #5
0
 def test_python_command(self):
   executor = PythonExecutor("/tmp", AgentConfig("", ""))
   command = executor.python_command("script", ["script_param1"])
   self.assertEqual(4, len(command))
   self.assertTrue("python" in command[0])
   self.assertEquals("-S", command[1])
   self.assertEquals("script", command[2])
   self.assertEquals("script_param1", command[3])
예제 #6
0
 def test_python_command(self):
     executor = PythonExecutor("/tmp", AgentConfig("", ""),
                               self.agentToggleLogger)
     command = executor.python_command("script", ["script_param1"])
     self.assertEqual(4, len(command))
     self.assertTrue("python" in command[0].lower(),
                     "Looking for python in %s" % (command[0].lower()))
     self.assertEquals("-S", command[1])
     self.assertEquals("script", command[2])
     self.assertEquals("script_param1", command[3])