mirror of
https://github.com/scito/extract_otp_secret_keys.git
synced 2025-12-06 14:54:57 +01:00
Test mutually exclusive arguments verbose and quiet (#25)
This commit is contained in:
parent
10fefacd2d
commit
eae01a07d5
2 changed files with 11 additions and 1 deletions
|
|
@ -209,6 +209,16 @@ def test_extract_help(capsys):
|
|||
assert pytest_wrapped_e.type == SystemExit
|
||||
assert pytest_wrapped_e.value.code == 0
|
||||
|
||||
def test_verbose_and_quiet(capsys):
|
||||
with raises(SystemExit) as pytest_wrapped_e:
|
||||
# Act
|
||||
extract_otp_secret_keys.main(['-v', '-q', 'example_export.txt'])
|
||||
|
||||
# Assert
|
||||
captured = capsys.readouterr()
|
||||
|
||||
assert len(captured.out) > 0
|
||||
assert 'The arguments --verbose and --quiet are mutually exclusive.' in captured.out
|
||||
|
||||
def cleanup():
|
||||
remove_file('test_example_output.csv')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue