示例#1
0
 def test_get_claimed_hardware(self, LocalComputer):
     class Mock(object):
         class SubMock(object):
             @classmethod
             def to_python_object(cls):
                 return [self.HARDWARE_ID]
         values_store = dict(MPIOSupportedDeviceList=SubMock())
     mock = Mock()
     LocalComputer.return_value.local_machine = \
         {"SYSTEM\\CurrentControlSet\\Control\\MPDEV":mock}
     MultipathClaim.get_claimed_hardware()