mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-08 07:18:47 +00:00
Merge pull request #394 from PR0M3TH3AN/codex/update-archive-test-cases-and-run-pytest
Adjust inputs for entry action menu
This commit is contained in:
@@ -42,7 +42,7 @@ def test_retrieve_entry_shows_custom_fields(monkeypatch, capsys):
|
||||
],
|
||||
)
|
||||
|
||||
inputs = iter(["0", "y", "", "n"])
|
||||
inputs = iter(["0", "y", "", ""])
|
||||
monkeypatch.setattr("builtins.input", lambda *a, **k: next(inputs))
|
||||
|
||||
pm.handle_retrieve_entry()
|
||||
|
@@ -43,7 +43,7 @@ def test_handle_retrieve_totp_entry(monkeypatch, capsys):
|
||||
|
||||
entry_mgr.add_totp("Example", TEST_SEED)
|
||||
|
||||
inputs = iter(["0", "n"])
|
||||
inputs = iter(["0", "n", ""])
|
||||
monkeypatch.setattr("builtins.input", lambda *a, **k: next(inputs))
|
||||
monkeypatch.setattr(pm.entry_manager, "get_totp_code", lambda *a, **k: "123456")
|
||||
monkeypatch.setattr(
|
||||
|
@@ -44,7 +44,7 @@ def test_show_qr_for_nostr_keys(monkeypatch):
|
||||
idx = entry_mgr.add_nostr_key("main")
|
||||
npub, _ = entry_mgr.get_nostr_key_pair(idx, TEST_SEED)
|
||||
|
||||
inputs = iter([str(idx), "n", ""])
|
||||
inputs = iter([str(idx), "n", "", ""])
|
||||
monkeypatch.setattr("builtins.input", lambda *a, **k: next(inputs))
|
||||
responses = iter([True, False])
|
||||
monkeypatch.setattr(
|
||||
|
@@ -41,7 +41,7 @@ def test_password_retrieve_secret_mode(monkeypatch, capsys):
|
||||
pm, entry_mgr = setup_pm(tmp)
|
||||
entry_mgr.add_entry("example", 8)
|
||||
|
||||
inputs = iter(["0", "n"])
|
||||
inputs = iter(["0", "n", ""])
|
||||
monkeypatch.setattr("builtins.input", lambda *a, **k: next(inputs))
|
||||
called = []
|
||||
monkeypatch.setattr(
|
||||
@@ -90,7 +90,7 @@ def test_password_retrieve_no_secret_mode(monkeypatch, capsys):
|
||||
pm.secret_mode_enabled = False
|
||||
entry_mgr.add_entry("example", 8)
|
||||
|
||||
inputs = iter(["0", "n"])
|
||||
inputs = iter(["0", "n", ""])
|
||||
monkeypatch.setattr("builtins.input", lambda *a, **k: next(inputs))
|
||||
called = []
|
||||
monkeypatch.setattr(
|
||||
|
Reference in New Issue
Block a user