c-v device test: rename valid to available

Update test to reflect 8a80990471

Signed-off-by: Jan Fajerski <jfajerski@suse.com>
This commit is contained in:
Jan Fajerski 2018-11-16 09:27:34 +01:00
parent d895f97bb0
commit 047dc1c157

View File

@ -189,25 +189,25 @@ class TestCephDiskDevice(object):
data = {"/dev/sdb": {"removable": 1}}
device_info(devices=data)
disk = device.Device("/dev/sdb")
assert not disk.is_valid
assert not disk.available
def test_accept_non_removable_device(self, device_info):
data = {"/dev/sdb": {"removable": 0}}
device_info(devices=data)
disk = device.Device("/dev/sdb")
assert disk.is_valid
assert disk.available
def test_reject_readonly_device(self, device_info):
data = {"/dev/cdrom": {"ro": 1}}
device_info(devices=data)
disk = device.Device("/dev/cdrom")
assert not disk.is_valid
assert not disk.available
def test_accept_non_readonly_device(self, device_info):
data = {"/dev/sda": {"ro": 0}}
device_info(devices=data)
disk = device.Device("/dev/sda")
assert disk.is_valid
assert disk.available
@pytest.mark.parametrize("label", ceph_partlabels)
def test_is_member_lsblk(self, device_info, label):