From 6af3f7df96e4f4ee6acf59ee2dca7461c78f8e8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E5=BA=94?= Date: Tue, 28 Apr 2026 14:12:36 +0800 Subject: [PATCH] test(history): add single history id acceptance test for multiple mode - Add test case to verify multiple-mode history lookup accepts a single history_id string - Create FakeVectorStore stub with minimal implementation for ReadHistory tests - Return requested history node from vector store mock - Initialize ReadHistory tool with multiple mode enabled - Add pylint disable comment for protected access to vector store property --- tests/test_reme_memory_error_handling.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_reme_memory_error_handling.py b/tests/test_reme_memory_error_handling.py index 93609da7..563e8221 100644 --- a/tests/test_reme_memory_error_handling.py +++ b/tests/test_reme_memory_error_handling.py @@ -139,8 +139,13 @@ async def test_summarize_memory_raises_runtime_error_for_unstructured_result(mon @pytest.mark.asyncio async def test_read_history_accepts_single_history_id_in_multiple_mode(): + """Verify multiple-mode history lookup accepts a single history_id string.""" + class FakeVectorStore: + """Minimal vector store stub for ReadHistory tests.""" + async def get(self, vector_ids): + """Return the requested history node.""" assert vector_ids == ["history_123"] node = MemoryNode( memory_id="history_123", @@ -151,7 +156,7 @@ async def test_read_history_accepts_single_history_id_in_multiple_mode(): return [node.to_vector_node()] tool = ReadHistory(enable_multiple=True) - tool._vector_store = FakeVectorStore() + tool._vector_store = FakeVectorStore() # pylint: disable=protected-access tool.context = RuntimeContext( history_id="history_123", retrieved_nodes=[],