コード例 #1
0
 def CreateVm(self, array_of_stdout):
     vm = CreateTestLinuxVm()
     vm.RemoteHostCommandWithReturnCode = mock.Mock(
         side_effect=[(str(text), '') for text in array_of_stdout])
     vm.CheckLsCpu = mock.Mock(
         return_value=linux_virtual_machine.LsCpuResults(self.lscpu_output))
     return vm
コード例 #2
0
 def testMissingRequiredLsCpuEntries(self):
     with self.assertRaises(ValueError):
         linux_virtual_machine.LsCpuResults('')