[master 1/10] Mock mount cache while running action tests.
dwlehman
installerbot-noreply at redhat.com
Mon Jul 20 21:39:22 UTC 2015
From: David Lehman <dlehman at redhat.com>
---
tests/storagetestcase.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tests/storagetestcase.py b/tests/storagetestcase.py
index 7ac48d3..8a2c89a 100644
--- a/tests/storagetestcase.py
+++ b/tests/storagetestcase.py
@@ -68,6 +68,9 @@ def partition_probe(device):
self.partition_probe = PartitionDevice.probe
PartitionDevice.probe = partition_probe
+ self.get_active_mounts = blivet.formats.fs.mountsCache._getActiveMounts
+ blivet.formats.fs.mountsCache._getActiveMounts = Mock()
+
def tearDown(self):
blivet.devices.StorageDevice.status = self.storage_status
blivet.devices.DMDevice.status = self.dm_status
@@ -83,6 +86,8 @@ def tearDown(self):
blivet.devices.PartitionDevice.probe = self.partition_probe
+ blivet.formats.fs.mountsCache._getActiveMounts = self.get_active_mounts
+
def newDevice(self, *args, **kwargs):
""" Return a new Device instance suitable for testing. """
device_class = kwargs.pop("device_class")
--
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/76efcf0232795e1d1795ba23e035adae1d19be06
More information about the anaconda-patches
mailing list