ceph-volume tests update is_mapper unit test when zapping

Signed-off-by: Alfredo Deza <adeza@redhat.com>
This commit is contained in:
Alfredo Deza 2018-11-28 13:46:05 -05:00
parent ba83c1f37e
commit 830cd7d638

View File

@ -19,7 +19,9 @@ class TestZap(object):
'/dev/mapper/foo',
'/dev/dm-0',
])
def test_can_not_zap_mapper_device(self, capsys, is_root, device_name):
def test_can_not_zap_mapper_device(self, monkeypatch, device_info, capsys, is_root, device_name):
monkeypatch.setattr('os.path.exists', lambda x: True)
device_info()
with pytest.raises(SystemExit):
lvm.zap.Zap(argv=[device_name]).main()
stdout, stderr = capsys.readouterr()