From 8b4eb3b77e7257d4ee6d9231a19d221252965933 Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Tue, 14 Jul 2026 15:21:39 +0200 Subject: [PATCH] test: drop stale mock of nonexistent ollama.embed_text The tenant-scoping fixture still stubbed embed_text, which does not exist on OllamaClient - the exact mock-a-nonexistent-method pattern that hid the original HybridRAG document-leg bug (406143e). A regression reintroducing embed_text would have passed this suite. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01QbFZyDvYksazX6nYQYZ67L --- tests/test_tenant_scoping.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_tenant_scoping.py b/tests/test_tenant_scoping.py index 53e39de..526d906 100644 --- a/tests/test_tenant_scoping.py +++ b/tests/test_tenant_scoping.py @@ -55,7 +55,9 @@ def mock_ollama(): ollama.embed_batch = AsyncMock( side_effect=lambda texts, **kw: [[0.1] * 768 for _ in texts] ) - ollama.embed_text = AsyncMock(return_value=[0.1] * 768) + # NOTE: do not stub methods that don't exist on OllamaClient (a stale + # embed_text stub here previously hid a latent AttributeError in the + # HybridRAG document leg - see 406143e). ollama.generate_text = AsyncMock(return_value="{}") return ollama