Fixed tests

This commit is contained in:
Cyber MacGeddon 2026-03-11 15:27:16 +00:00
parent 90c1c8cc2f
commit 22c77ebead
2 changed files with 16 additions and 10 deletions

View file

@ -5,7 +5,7 @@ passed to the DocumentRag.query() method.
"""
import pytest
from unittest.mock import MagicMock, AsyncMock, patch
from unittest.mock import MagicMock, AsyncMock, patch, ANY
from trustgraph.retrieval.document_rag.rag import Processor
from trustgraph.schema import DocumentRagQuery, DocumentRagResponse
@ -65,8 +65,9 @@ class TestDocumentRagService:
mock_rag_instance.query.assert_called_once_with(
"test query",
user="my_user", # Must be from message, not hardcoded default
collection="test_coll_1", # Must be from message, not hardcoded default
doc_limit=5
collection="test_coll_1", # Must be from message, not hardcoded default
doc_limit=5,
explain_callback=ANY, # Explainability callback is always passed
)
# Verify response was sent