<s> import pytest <EOL> from ceph_deploy . cli import get_parser <EOL> class TestParserPurge ( object ) : <EOL> def setup ( self ) : <EOL> self . parser = get_parser ( ) <EOL> def test_purge_help ( self , capsys ) : <EOL> with pytest . raises ( SystemExit ) : <EOL> self . parser . parse_args ( '<STR_LIT>' . split ( ) ) <EOL> out , err = capsys . readouterr ( ) <EOL> assert '<STR_LIT>' in out <EOL> assert '<STR_LIT>' in out <EOL> assert '<STR_LIT>' in out <EOL> def test_purge_host_required ( self , capsys ) : <EOL> with pytest . raises ( SystemExit ) : <EOL> self . parser . parse_args ( '<STR_LIT>' . split ( ) ) <EOL> out , err = capsys . readouterr ( ) <EOL> assert "<STR_LIT>" in err <EOL> def test_purge_one_host ( self ) : <EOL> args = self . parser . parse_args ( '<STR_LIT>' . split ( ) ) <EOL> assert args . host == [ '<STR_LIT>' ] <EOL> def test_purge_multiple_hosts ( self ) : <EOL> hostnames = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> args = self . parser . parse_args ( [ '<STR_LIT>' ] + hostnames ) <EOL> assert frozenset ( args . host ) == frozenset ( hostnames ) </s>
