Пример #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'