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

@@ -108,6 +108,16 @@ Type: OTP_TOTP
self.assertEqual(actual_output, expected_output)
def test_extract_verbose(self):
out = io.StringIO()
with redirect_stdout(out):
extract_otp_secret_keys.main(['-v', 'example_export.txt'])
actual_output = out.getvalue()
expected_output = read_file_to_str('test/print_verbose_output.txt')
self.assertEqual(actual_output, expected_output)
def setUp(self):
self.cleanup()