test: update helper PasswordManager mocks

This commit is contained in:
thePR0M3TH3AN committed 2025-07-14 17:24:08 -04:00
1 parent 59790543ab
commit 16982f489d
2 files changed
+7 -5

No files matched your search

+3 -5
View File
@@ -17,6 +17,8 @@ def _make_pm(msg):
return SimpleNamespace(
notifications=q,
get_current_notification=lambda: q.queue[-1] if not q.empty() else None,
_current_notification=None,
_notification_expiry=0.0,
is_dirty=False,
last_update=time.time(),
last_activity=time.time(),
@@ -45,11 +47,7 @@ def test_display_menu_prints_notifications(monkeypatch, capsys):
"clear_header_with_notification",
lambda pm, *a, **k: (
print("HEADER"),
print(
pm.get_current_notification().message
if pm.get_current_notification()
else ""
),
print(main.get_notification_text(pm)),
),
)
monkeypatch.setattr(main, "timed_input", lambda *a, **k: "")