Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / src / ceph-volume / ceph_volume / tests / devices / test_zap.py
1 import pytest
2 from ceph_volume.devices import lvm
3
4
5 class TestZap(object):
6
7     def test_main_spits_help_with_no_arguments(self, capsys):
8         lvm.zap.Zap([]).main()
9         stdout, stderr = capsys.readouterr()
10         assert 'Zaps the given logical volume or partition' in stdout
11
12     def test_main_shows_full_help(self, capsys):
13         with pytest.raises(SystemExit):
14             lvm.zap.Zap(argv=['--help']).main()
15         stdout, stderr = capsys.readouterr()
16         assert 'optional arguments' in stdout
17         assert 'positional arguments' in stdout