Lines Matching refs:mock_cmd_exec
40 mock_cmd_exec = mock.Mock(spec=command_executer.CommandExecuter)
47 logger_to_use=MOCK_LOGGER, cmd_exec=mock_cmd_exec)
69 self.assertEqual(mock_cmd_exec.RunCommand.call_count, 1)
76 mock_cmd_exec.RunCommand.assert_called_with(expected_args)
80 mock_cmd_exec.reset_mock()
96 self.assertEqual(mock_cmd_exec.RunCommand.call_count, 0)
97 self.assertEqual(mock_cmd_exec.ChrootRunCommand.call_count, 0)
103 mock_cmd_exec = mock.Mock(spec=command_executer.CommandExecuter)
108 logger_to_use=MOCK_LOGGER, cmd_exec=mock_cmd_exec)
122 self.assertEqual(mock_cmd_exec.RunCommand.call_count, 2)
124 self.assertEqual(len(mock_cmd_exec.RunCommand.call_args_list[0]), 2)
125 actual_arg = mock_cmd_exec.RunCommand.call_args_list[0][0]
133 except_handler_string in repr(mock_cmd_exec.RunCommand.call_args_list[0]
137 self.assertEqual(len(mock_cmd_exec.RunCommand.call_args_list[1]), 2)
138 actual_arg = mock_cmd_exec.RunCommand.call_args_list[1][0]
144 self.assertTrue('{}' in repr(mock_cmd_exec.RunCommand.call_args_list[1][1]))
148 mock_cmd_exec.reset_mock()
159 self.assertEqual(mock_cmd_exec.RunCommand.call_count, 0)