示例#1
0
 def setUp(self):
     patches = ((
         'salt.utils.vmware.get_service_instance_from_managed_object',
         MagicMock()), ('salt.utils.vmware.get_mors_with_properties',
                        MagicMock(return_value=[MagicMock()])))
     for mod, mock in patches:
         patcher = patch(mod, mock)
         patcher.start()
         self.addCleanup(patcher.stop)
     self.mock_si = MagicMock()
     self.fake_mo_ref = vim.ManagedEntity('Fake')
     self.mock_props = MagicMock()
     self.mock_item_name = {'name': 'fake_name'}
     self.mock_item = MagicMock()
示例#2
0
 def setUp(self):
     self.mock_si = MagicMock()
     self.fake_mo_ref = vim.ManagedEntity('Fake')
     self.mock_props = MagicMock()
     self.mock_item_name = {'name': 'fake_name'}
     self.mock_item = MagicMock()