mirror of
https://github.com/scito/extract_otp_secrets.git
synced 2025-12-16 01:45:22 +01:00
add test keepass with no data
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user