mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-24 12:41:02 +02:00
Fix test
This commit is contained in:
parent
4ea3331270
commit
ce5fc60131
2 changed files with 8 additions and 8 deletions
|
|
@ -104,7 +104,7 @@ class TestQdrantDocEmbeddingsQuery(IsolatedAsyncioTestCase):
|
||||||
|
|
||||||
# Assert
|
# Assert
|
||||||
# Verify query was called with correct parameters
|
# Verify query was called with correct parameters
|
||||||
expected_collection = 'd_test_user_test_collection_3'
|
expected_collection = 'd_test_user_test_collection'
|
||||||
mock_qdrant_instance.query_points.assert_called_once_with(
|
mock_qdrant_instance.query_points.assert_called_once_with(
|
||||||
collection_name=expected_collection,
|
collection_name=expected_collection,
|
||||||
query=[0.1, 0.2, 0.3],
|
query=[0.1, 0.2, 0.3],
|
||||||
|
|
@ -166,7 +166,7 @@ class TestQdrantDocEmbeddingsQuery(IsolatedAsyncioTestCase):
|
||||||
assert mock_qdrant_instance.query_points.call_count == 2
|
assert mock_qdrant_instance.query_points.call_count == 2
|
||||||
|
|
||||||
# Verify both collections were queried
|
# Verify both collections were queried
|
||||||
expected_collection = 'd_multi_user_multi_collection_2'
|
expected_collection = 'd_multi_user_multi_collection'
|
||||||
calls = mock_qdrant_instance.query_points.call_args_list
|
calls = mock_qdrant_instance.query_points.call_args_list
|
||||||
assert calls[0][1]['collection_name'] == expected_collection
|
assert calls[0][1]['collection_name'] == expected_collection
|
||||||
assert calls[1][1]['collection_name'] == expected_collection
|
assert calls[1][1]['collection_name'] == expected_collection
|
||||||
|
|
@ -303,11 +303,11 @@ class TestQdrantDocEmbeddingsQuery(IsolatedAsyncioTestCase):
|
||||||
calls = mock_qdrant_instance.query_points.call_args_list
|
calls = mock_qdrant_instance.query_points.call_args_list
|
||||||
|
|
||||||
# First call should use 2D collection
|
# First call should use 2D collection
|
||||||
assert calls[0][1]['collection_name'] == 'd_dim_user_dim_collection_2'
|
assert calls[0][1]['collection_name'] == 'd_dim_user_dim_collection'
|
||||||
assert calls[0][1]['query'] == [0.1, 0.2]
|
assert calls[0][1]['query'] == [0.1, 0.2]
|
||||||
|
|
||||||
# Second call should use 3D collection
|
# Second call should use 3D collection
|
||||||
assert calls[1][1]['collection_name'] == 'd_dim_user_dim_collection_3'
|
assert calls[1][1]['collection_name'] == 'd_dim_user_dim_collection'
|
||||||
assert calls[1][1]['query'] == [0.3, 0.4, 0.5]
|
assert calls[1][1]['query'] == [0.3, 0.4, 0.5]
|
||||||
|
|
||||||
# Verify results
|
# Verify results
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,7 @@ class TestQdrantGraphEmbeddingsQuery(IsolatedAsyncioTestCase):
|
||||||
|
|
||||||
# Assert
|
# Assert
|
||||||
# Verify query was called with correct parameters
|
# Verify query was called with correct parameters
|
||||||
expected_collection = 't_test_user_test_collection_3'
|
expected_collection = 't_test_user_test_collection'
|
||||||
mock_qdrant_instance.query_points.assert_called_once_with(
|
mock_qdrant_instance.query_points.assert_called_once_with(
|
||||||
collection_name=expected_collection,
|
collection_name=expected_collection,
|
||||||
query=[0.1, 0.2, 0.3],
|
query=[0.1, 0.2, 0.3],
|
||||||
|
|
@ -236,7 +236,7 @@ class TestQdrantGraphEmbeddingsQuery(IsolatedAsyncioTestCase):
|
||||||
assert mock_qdrant_instance.query_points.call_count == 2
|
assert mock_qdrant_instance.query_points.call_count == 2
|
||||||
|
|
||||||
# Verify both collections were queried
|
# Verify both collections were queried
|
||||||
expected_collection = 't_multi_user_multi_collection_2'
|
expected_collection = 't_multi_user_multi_collection'
|
||||||
calls = mock_qdrant_instance.query_points.call_args_list
|
calls = mock_qdrant_instance.query_points.call_args_list
|
||||||
assert calls[0][1]['collection_name'] == expected_collection
|
assert calls[0][1]['collection_name'] == expected_collection
|
||||||
assert calls[1][1]['collection_name'] == expected_collection
|
assert calls[1][1]['collection_name'] == expected_collection
|
||||||
|
|
@ -374,11 +374,11 @@ class TestQdrantGraphEmbeddingsQuery(IsolatedAsyncioTestCase):
|
||||||
calls = mock_qdrant_instance.query_points.call_args_list
|
calls = mock_qdrant_instance.query_points.call_args_list
|
||||||
|
|
||||||
# First call should use 2D collection
|
# First call should use 2D collection
|
||||||
assert calls[0][1]['collection_name'] == 't_dim_user_dim_collection_2'
|
assert calls[0][1]['collection_name'] == 't_dim_user_dim_collection'
|
||||||
assert calls[0][1]['query'] == [0.1, 0.2]
|
assert calls[0][1]['query'] == [0.1, 0.2]
|
||||||
|
|
||||||
# Second call should use 3D collection
|
# Second call should use 3D collection
|
||||||
assert calls[1][1]['collection_name'] == 't_dim_user_dim_collection_3'
|
assert calls[1][1]['collection_name'] == 't_dim_user_dim_collection'
|
||||||
assert calls[1][1]['query'] == [0.3, 0.4, 0.5]
|
assert calls[1][1]['query'] == [0.3, 0.4, 0.5]
|
||||||
|
|
||||||
# Verify results
|
# Verify results
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue