test(tui_gateway): accept predicate kwarg in _close_session_by_id stub

The LRU-cap test in tests/tui_gateway/test_protocol.py stubs
_close_session_by_id with a two-arg lambda; the reaper now passes a
revalidation predicate. Widen the stub signature.
This commit is contained in:
Teknium 2026-08-02 11:46:23 -07:00
parent e57a8f5cb9
commit 9667236ccb
1 changed files with 3 additions and 1 deletions

View File

@ -356,7 +356,9 @@ def test_enforce_session_cap_evicts_oldest_detached_only(server, monkeypatch):
monkeypatch.setattr(server, "_load_cfg", lambda: {"max_live_sessions": 2})
evicted: list[str] = []
monkeypatch.setattr(
server, "_close_session_by_id", lambda sid, end_reason=None: evicted.append(sid)
server,
"_close_session_by_id",
lambda sid, end_reason=None, predicate=None: evicted.append(sid),
)
def _ready() -> threading.Event: