mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-06-13 16:55:14 +02:00
Fixing tests
This commit is contained in:
parent
84015b502a
commit
1c6e893a90
2 changed files with 8 additions and 8 deletions
|
|
@ -97,14 +97,14 @@ class TestMilvusDocEmbeddingsStorageProcessor:
|
|||
@pytest.mark.asyncio
|
||||
async def test_store_document_embeddings_multiple_chunks(self, processor, mock_message):
|
||||
"""Test storing document embeddings for multiple chunks"""
|
||||
await processor.store_document_embeddings(mock_message)
|
||||
await processor.store_document_embeddings('test_workspace', mock_message)
|
||||
|
||||
# Verify insert was called once per chunk with user/collection parameters
|
||||
# Verify insert was called once per chunk with workspace/collection parameters
|
||||
expected_calls = [
|
||||
# Chunk 1 - single vector
|
||||
([0.1, 0.2, 0.3, 0.4, 0.5, 0.6], "This is the first document chunk", 'test_user', 'test_collection'),
|
||||
([0.1, 0.2, 0.3, 0.4, 0.5, 0.6], "This is the first document chunk", 'test_workspace', 'test_collection'),
|
||||
# Chunk 2 - single vector
|
||||
([0.7, 0.8, 0.9], "This is the second document chunk", 'test_user', 'test_collection'),
|
||||
([0.7, 0.8, 0.9], "This is the second document chunk", 'test_workspace', 'test_collection'),
|
||||
]
|
||||
|
||||
assert processor.vecstore.insert.call_count == 2
|
||||
|
|
|
|||
|
|
@ -100,14 +100,14 @@ class TestMilvusGraphEmbeddingsStorageProcessor:
|
|||
@pytest.mark.asyncio
|
||||
async def test_store_graph_embeddings_multiple_entities(self, processor, mock_message):
|
||||
"""Test storing graph embeddings for multiple entities"""
|
||||
await processor.store_graph_embeddings(mock_message)
|
||||
await processor.store_graph_embeddings('test_workspace', mock_message)
|
||||
|
||||
# Verify insert was called once per entity with user/collection parameters
|
||||
# Verify insert was called once per entity with workspace/collection parameters
|
||||
expected_calls = [
|
||||
# Entity 1 - single vector
|
||||
([0.1, 0.2, 0.3, 0.4, 0.5, 0.6], 'http://example.com/entity1', 'test_user', 'test_collection'),
|
||||
([0.1, 0.2, 0.3, 0.4, 0.5, 0.6], 'http://example.com/entity1', 'test_workspace', 'test_collection'),
|
||||
# Entity 2 - single vector
|
||||
([0.7, 0.8, 0.9], 'literal entity', 'test_user', 'test_collection'),
|
||||
([0.7, 0.8, 0.9], 'literal entity', 'test_workspace', 'test_collection'),
|
||||
]
|
||||
|
||||
assert processor.vecstore.insert.call_count == 2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue