mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-11 22:32:12 +02:00
Fixed tests
This commit is contained in:
parent
90c1c8cc2f
commit
22c77ebead
2 changed files with 16 additions and 10 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue