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

Method test_list_sessions

tests/chat/test_session_store.py:60–78  ·  view source on GitHub ↗
(self, store, sample_data)

Source from the content-addressed store, hash-verified

58 assert sessions == []
59
60 def test_list_sessions(self, store, sample_data):
61 store.save(sample_data)
62
63 # Save another session
64 data2 = SessionData(
65 metadata=SessionMetadata(
66 session_id="test-def456",
67 provider="anthropic",
68 model="claude-3",
69 ),
70 messages=[{"role": "user", "content": "Test"}],
71 )
72 store.save(data2)
73
74 sessions = store.list_sessions()
75 assert len(sessions) == 2
76 ids = {s.session_id for s in sessions}
77 assert "test-abc123" in ids
78 assert "test-def456" in ids
79
80 def test_delete_existing(self, store, sample_data):
81 store.save(sample_data)

Callers

nothing calls this directly

Calls 4

SessionDataClass · 0.90
SessionMetadataClass · 0.90
list_sessionsMethod · 0.80
saveMethod · 0.45

Tested by

no test coverage detected