示例#1
0
 def test_run_command_subprocess_error(self, mock_subprocess):
     mock_subprocess.return_value = ('test', 'error')
     with self.assertRaises(Exception):
         mesos.run_command("echo test".split(" "))
示例#2
0
 def test_open_file_error(self):
     with self.assertRaises(Exception):
         mesos.run_command(mesos.open_file("test"))
示例#3
0
 def test_run_command(self):
     assert mesos.run_command("echo test".split(" ")) == 'test\n'