mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-05-03 12:22:37 +02:00
Fixing tests
This commit is contained in:
parent
4e3db11323
commit
9a4bfafb25
6 changed files with 33 additions and 14 deletions
|
|
@ -11,6 +11,7 @@ NOTE: This is the first integration test file for GraphRAG (previously had only
|
|||
import pytest
|
||||
from unittest.mock import AsyncMock, MagicMock
|
||||
from trustgraph.retrieval.graph_rag.graph_rag import GraphRag
|
||||
from trustgraph.schema import EntityMatch, Term
|
||||
|
||||
|
||||
@pytest.mark.integration
|
||||
|
|
@ -35,9 +36,9 @@ class TestGraphRagIntegration:
|
|||
"""Mock graph embeddings client that returns realistic entities"""
|
||||
client = AsyncMock()
|
||||
client.query.return_value = [
|
||||
"http://trustgraph.ai/e/machine-learning",
|
||||
"http://trustgraph.ai/e/artificial-intelligence",
|
||||
"http://trustgraph.ai/e/neural-networks"
|
||||
EntityMatch(entity=Term(value="http://trustgraph.ai/e/machine-learning", is_uri=True), score=0.95),
|
||||
EntityMatch(entity=Term(value="http://trustgraph.ai/e/artificial-intelligence", is_uri=True), score=0.90),
|
||||
EntityMatch(entity=Term(value="http://trustgraph.ai/e/neural-networks", is_uri=True), score=0.85)
|
||||
]
|
||||
return client
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue