Extend CLI entry commands

This commit is contained in:
thePR0M3TH3AN
2025-07-09 13:00:03 -04:00
parent 1dfcc233b8
commit 89901c3647
2 changed files with 146 additions and 4 deletions

View File

@@ -201,8 +201,8 @@ def test_entry_add(monkeypatch):
def test_entry_modify(monkeypatch):
called = {}
def modify_entry(index, username=None, url=None, notes=None, label=None):
called["args"] = (index, username, url, notes, label)
def modify_entry(index, username=None, url=None, notes=None, label=None, **kwargs):
called["args"] = (index, username, url, notes, label, kwargs)
pm = SimpleNamespace(
entry_manager=SimpleNamespace(modify_entry=modify_entry),
@@ -211,7 +211,7 @@ def test_entry_modify(monkeypatch):
monkeypatch.setattr(cli, "PasswordManager", lambda: pm)
result = runner.invoke(app, ["entry", "modify", "1", "--username", "alice"])
assert result.exit_code == 0
assert called["args"] == (1, "alice", None, None, None)
assert called["args"][:5] == (1, "alice", None, None, None)
def test_entry_archive(monkeypatch):