Esempio n. 1
0
 def set_patches(self):
     super(PartitionDeviceMethodsTestCase, self).set_patches()
     self.patchers["parted_partition"] = patch.object(self.device_class,
                                                      "parted_partition",
                                                      new=PropertyMock())
     self.patchers["disk"] = patch.object(self.device_class,
                                          "disk",
                                          new=PropertyMock())
Esempio n. 2
0
 def set_patches(self):
     super(LUKSMethodsTestCase, self).set_patches()
     self.patchers["configured"] = patch.object(
         self.format_class,
         "configured",
         new=PropertyMock(return_value=True))
     self.patchers["has_key"] = patch.object(
         self.format_class, "has_key", new=PropertyMock(return_value=True))
     self.patchers["blockdev"] = patch("blivet.formats.luks.blockdev")
Esempio n. 3
0
 def set_patches(self):
     self.patchers["update_sysfs_path"] = patch.object(self.device, "update_sysfs_path")
     self.patchers["udev"] = patch("blivet.devices.storage.udev")
     self.patchers["update_size"] = patch.object(self.device, "update_size")
     self.patchers["setup_parents"] = patch.object(self.device, "setup_parents")
     self.patchers["teardown_parents"] = patch.object(self.device, "teardown_parents")
     self.patchers["media_present"] = patch.object(self.device_class, "media_present",
                                                   new=PropertyMock(return_value=True))
     self.patchers["status"] = patch.object(self.device_class, "status", new=PropertyMock())
Esempio n. 4
0
 def set_patches(self):
     super(MDRaidArrayDeviceMethodsTestCase, self).set_patches()
     self.patchers["md"] = patch("blivet.devices.md.blockdev.md")
     self.patchers["is_disk"] = patch.object(
         self.device_class, "is_disk", new=PropertyMock(return_value=False))
     self.patchers["pvs_info"] = patch("blivet.devices.md.pvs_info")
     self.patchers["lvm"] = patch("blivet.devices.md.blockdev.lvm")
Esempio n. 5
0
 def set_patches(self):
     super(FSMethodsTestCase, self).set_patches()
     self.patchers["udev"] = patch("blivet.formats.fs.udev")
     self.patchers["util"] = patch("blivet.formats.fs.util")
     self.patchers["system_mountpoint"] = patch.object(
         self.format_class,
         "system_mountpoint",
         new=PropertyMock(return_value='/fake/mountpoint'))
     self.patchers["fs_os"] = patch("blivet.formats.fs.os")
Esempio n. 6
0
 def set_patches(self):
     # self.patchers["update_sysfs_path"] = patch.object(self.device, "update_sysfs_path")
     self.patchers["status"] = patch.object(
         self.format_class, "status", new=PropertyMock(return_value=False))
     self.patchers["os"] = patch("blivet.formats.os")
Esempio n. 7
0
 def set_patches(self):
     super(LVMVolumeGroupDeviceMethodsTestCase, self).set_patches()
     self.patchers["complete"] = patch.object(
         self.device_class, "complete", new=PropertyMock(return_value=True))