def test_execute_commands(self, subprocess_call): execute_commands(["ble"]) subprocess_call.assert_called_with("ble", shell=True, cwd="/home/application/current")
def test_execute_commands_specific_cwd(self, subprocess_call): execute_commands(["ble"], working_dir="/tmp") subprocess_call.assert_called_with("ble", shell=True, cwd="/tmp")
def test_execute_commands(self, system): execute_commands(["ble"]) system.assert_called_with("ble")
def test_execute_commands_failure(self, subprocess_call): subprocess_call.return_value = 7 with self.assertRaises(SystemExit) as cm: execute_commands(["ble"]) exc = cm.exception self.assertEqual(7, exc.code)
def test_execute_commands_specific_cwd(self, subprocess_call): subprocess_call.return_value = 0 execute_commands(["ble"], working_dir="/tmp") subprocess_call.assert_called_with("ble", shell=True, cwd="/tmp")
def test_execute_commands(self, subprocess_call): subprocess_call.return_value = 0 execute_commands(["ble"]) subprocess_call.assert_called_with("ble", shell=True, cwd="/home/application/current")