Merge "Tests: mock psutil usage in quobyte tests"
This commit is contained in:
commit
4007618092
|
@ -970,7 +970,9 @@ class QuobyteDriverTestCase(test.TestCase):
|
|||
stat_mock.assert_called_once_with(self.TEST_MNT_POINT)
|
||||
part_mock.assert_called_once_with(all=True)
|
||||
|
||||
def test_validate_volume_no_mtab_entry(self):
|
||||
@mock.patch.object(psutil, "disk_partitions")
|
||||
def test_validate_volume_no_mtab_entry(self, part_mock):
|
||||
part_mock.return_value = [] # no quobyte@ devices
|
||||
msg = ("Volume driver reported an error: "
|
||||
"No matching Quobyte mount entry for %(mpt)s"
|
||||
" could be found for validation in partition list."
|
||||
|
|
Loading…
Reference in New Issue