mirror of
https://github.com/scito/extract_otp_secret_keys.git
synced 2025-12-14 18:46:38 +01:00
fix test compatibility with Alpine Linux
This commit is contained in:
parent
604c461549
commit
16047a5b15
1 changed files with 9 additions and 2 deletions
|
|
@ -466,13 +466,20 @@ def test_wrong_data(capsys: pytest.CaptureFixture[str]) -> None:
|
||||||
# Assert
|
# Assert
|
||||||
captured = capsys.readouterr()
|
captured = capsys.readouterr()
|
||||||
|
|
||||||
expected_stderr = '''
|
first_expected_stderr = '''
|
||||||
ERROR: Cannot decode otpauth-migration migration payload.
|
ERROR: Cannot decode otpauth-migration migration payload.
|
||||||
data=XXXX
|
data=XXXX
|
||||||
Exception: Error parsing message
|
Exception: Error parsing message
|
||||||
'''
|
'''
|
||||||
|
|
||||||
assert captured.err == expected_stderr
|
# Alpine Linux prints this exception message
|
||||||
|
second_expected_stderr = '''
|
||||||
|
ERROR: Cannot decode otpauth-migration migration payload.
|
||||||
|
data=XXXX
|
||||||
|
Exception: unpack requires a buffer of 4 bytes
|
||||||
|
'''
|
||||||
|
|
||||||
|
assert captured.err == first_expected_stderr or captured.err == second_expected_stderr
|
||||||
assert captured.out == ''
|
assert captured.out == ''
|
||||||
assert e.value.code == 1
|
assert e.value.code == 1
|
||||||
assert e.type == SystemExit
|
assert e.type == SystemExit
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue