MCPcopy Create free account
hub / github.com/IBM/mcp-cli / test_get_session_stats

Method test_get_session_stats

tests/chat/test_chat_context.py:1589–1598  ·  view source on GitHub ↗

get_session_stats returns a stats object with session_id attribute.

(self, monkeypatch)

Source from the content-addressed store, hash-verified

1587
1588 @pytest.mark.asyncio
1589 async def test_get_session_stats(self, monkeypatch):
1590 """get_session_stats returns a stats object with session_id attribute."""
1591 ctx = _make_initialized_ctx(monkeypatch)
1592 ctx._system_prompt = "SYS"
1593 await ctx._initialize_session()
1594
1595 stats = await ctx.get_session_stats()
1596 # SessionManager.get_stats() returns a SessionStats (DictCompatModel) object
1597 assert stats is not None
1598 assert hasattr(stats, "session_id")
1599
1600
1601# ---------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 3

_make_initialized_ctxFunction · 0.85
_initialize_sessionMethod · 0.80
get_session_statsMethod · 0.80

Tested by

no test coverage detected