mirror of
https://github.com/scito/extract_otp_secret_keys.git
synced 2025-12-13 18:16:37 +01:00
handle errors while reading QR from camera; log errors
This commit is contained in:
parent
19c8e9df23
commit
fff74fc638
3 changed files with 58 additions and 42 deletions
|
|
@ -468,6 +468,7 @@ def test_wrong_data(capsys: pytest.CaptureFixture[str]) -> None:
|
|||
expected_stderr = '''
|
||||
ERROR: Cannot decode otpauth-migration migration payload.
|
||||
data=XXXX
|
||||
Exception: Error parsing message
|
||||
'''
|
||||
|
||||
assert captured.err == expected_stderr
|
||||
|
|
@ -705,7 +706,7 @@ def test_extract_stdin_stdout_wrong_symbol(capsys: pytest.CaptureFixture[str], m
|
|||
# Assert
|
||||
captured = capsys.readouterr()
|
||||
|
||||
expected_stderr = "\nERROR: Cannot read binary stdin buffer. Exception: a bytes-like object is required, not 'str'\n"
|
||||
expected_stderr = "\nERROR: Cannot read binary stdin buffer.\nException: a bytes-like object is required, not 'str'\n"
|
||||
|
||||
assert captured.err == expected_stderr
|
||||
assert captured.out == ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue