mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-09 15:58:48 +00:00
Add clipboard copy message for totp CLI
This commit is contained in:
@@ -809,6 +809,7 @@ def main(argv: list[str] | None = None) -> int:
|
||||
print(code)
|
||||
try:
|
||||
pyperclip.copy(code)
|
||||
print(colored("Code copied to clipboard", "green"))
|
||||
except Exception as exc:
|
||||
logging.warning(f"Clipboard copy failed: {exc}")
|
||||
return 0
|
||||
|
@@ -63,4 +63,5 @@ def test_totp_command(monkeypatch, capsys):
|
||||
assert rc == 0
|
||||
out = capsys.readouterr().out
|
||||
assert "123456" in out
|
||||
assert "copied to clipboard" in out.lower()
|
||||
assert called.get("val") == "123456"
|
||||
|
Reference in New Issue
Block a user