add test for verbose output

This commit is contained in:
scito
2022-09-04 07:42:27 +02:00
parent 33bba8848a
commit 16d9fffc4a
3 changed files with 112 additions and 0 deletions

View File

@@ -101,6 +101,19 @@ def test_extract_printqr(capsys):
assert captured.err == ''
def test_extract_verbose(capsys):
# Act
extract_otp_secret_keys.main(['-v', 'example_export.txt'])
# Assert
captured = capsys.readouterr()
expected_stdout = read_file_to_str('test/print_verbose_output.txt')
assert captured.out == expected_stdout
assert captured.err == ''
def cleanup():
remove_file('test_example_output.csv')
remove_file('test_example_output.json')