mirror of
https://github.com/scito/extract_otp_secret_keys.git
synced 2025-12-14 02:26:43 +01:00
add test keepass with no data
This commit is contained in:
parent
b215b78dad
commit
36fd0c0bb6
3 changed files with 16 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
# Extract TOTP/HOTP secrets from QR codes exported by two-factor authentication apps
|
# Extract TOTP/HOTP secrets from QR codes exported by two-factor authentication apps
|
||||||
|
|
||||||
[](https://github.com/scito/extract_otp_secrets/actions/workflows/ci.yml)
|
[](https://github.com/scito/extract_otp_secrets/actions/workflows/ci.yml)
|
||||||

|

|
||||||
[](https://github.com/scito/extract_otp_secrets/actions/workflows/ci_docker.yml)
|
[](https://github.com/scito/extract_otp_secrets/actions/workflows/ci_docker.yml)
|
||||||

|

|
||||||
[](https://github.com/scito/extract_otp_secrets/blob/master/Pipfile.lock)
|
[](https://github.com/scito/extract_otp_secrets/blob/master/Pipfile.lock)
|
||||||
|
|
|
||||||
3
tests/data/only_comments.txt
Normal file
3
tests/data/only_comments.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
# comment 1
|
||||||
|
|
||||||
|
# comment 2
|
||||||
|
|
@ -225,6 +225,18 @@ def test_keepass_csv(capsys: pytest.CaptureFixture[str], tmp_path: pathlib.Path)
|
||||||
assert captured.err == ''
|
assert captured.err == ''
|
||||||
|
|
||||||
|
|
||||||
|
def test_keepass_empty(capsys: pytest.CaptureFixture[str], tmp_path: pathlib.Path) -> None:
|
||||||
|
# Act
|
||||||
|
extract_otp_secrets.main(['-k', '-', 'tests/data/only_comments.txt'])
|
||||||
|
|
||||||
|
# Assert
|
||||||
|
|
||||||
|
captured = capsys.readouterr()
|
||||||
|
|
||||||
|
assert captured.out == ''
|
||||||
|
assert captured.err == ''
|
||||||
|
|
||||||
|
|
||||||
def test_keepass_csv_stdout(capsys: pytest.CaptureFixture[str]) -> None:
|
def test_keepass_csv_stdout(capsys: pytest.CaptureFixture[str]) -> None:
|
||||||
'''Two csv files .totp and .htop are generated.'''
|
'''Two csv files .totp and .htop are generated.'''
|
||||||
# Act
|
# Act
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue