Lines Matching refs:mock_run_cmd

142   def test_image_machine(self, mock_checksummer, mock_run_croscmd, mock_run_cmd,  argument
158 mock_run_cmd.reset_mock()
167 self.mock_cmd_exec.RunCommand = mock_run_cmd
180 self.assertEqual(mock_run_cmd.call_count, 0)
186 mock_run_cmd.return_value = 0
195 mock_run_cmd.return_value = 1
200 self.assertEqual(mock_run_cmd.call_count, 2)
203 image_call_args_str = mock_run_cmd.call_args[0][0]
218 mock_run_cmd.return_value = 0
724 def test_is_reachable(self, mock_setup, mock_run_cmd): argument
728 self.mock_cmd_exec.CrosRunCommand = mock_run_cmd
731 mock_run_cmd.return_value = 1
735 self.assertEqual(mock_run_cmd.call_count, 1)
738 mock_run_cmd.return_value = 0
741 self.assertEqual(mock_run_cmd.call_count, 2)
742 first_args = mock_run_cmd.call_args_list[0]
743 second_args = mock_run_cmd.call_args_list[1]
763 def test_get_memory_info(self, _mock_setup, mock_run_cmd): argument
766 self.mock_cmd_exec.CrosRunCommandWOutput = mock_run_cmd
767 mock_run_cmd.return_value = [0, MEMINFO_STRING, '']
769 self.assertEqual(mock_run_cmd.call_count, 1)
770 call_args = mock_run_cmd.call_args_list[0]
778 mock_run_cmd.return_value = [1, MEMINFO_STRING, '']
783 def test_get_cpu_info(self, _mock_setup, mock_run_cmd): argument
786 self.mock_cmd_exec.CrosRunCommandWOutput = mock_run_cmd
787 mock_run_cmd.return_value = [0, CPUINFO_STRING, '']
789 self.assertEqual(mock_run_cmd.call_count, 1)
790 call_args = mock_run_cmd.call_args_list[0]
821 def test_get_machine_id(self, _mock_setup, mock_run_cmd): argument
824 self.mock_cmd_exec.CrosRunCommandWOutput = mock_run_cmd
825 mock_run_cmd.return_value = [0, DUMP_VPD_STRING, '']
830 mock_run_cmd.return_value = [0, IFCONFIG_STRING, '']
838 mock_run_cmd.return_value = [0, 'invalid hardware config', '']