mirror of
https://github.com/scito/extract_otp_secrets.git
synced 2025-12-15 11:21:43 +01:00
Test mutually exclusive arguments verbose and quiet (#25)
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user