chore: docstrings und tighter upsert-test fuer qdrant store
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from unittest.mock import MagicMock, patch
|
||||
from unittest.mock import MagicMock
|
||||
import pytest
|
||||
|
||||
from app.qdrant_store import (
|
||||
@@ -57,7 +57,15 @@ def test_upsert_chunks_calls_client_upsert():
|
||||
fake_client.upsert.assert_called_once()
|
||||
kwargs = fake_client.upsert.call_args.kwargs
|
||||
assert kwargs["collection_name"] == "rag_test"
|
||||
assert len(kwargs["points"]) == 2
|
||||
produced = kwargs["points"]
|
||||
assert len(produced) == 2
|
||||
assert produced[0].vector == [0.1] * 4
|
||||
assert produced[0].payload == {"file_path": "a", "chunk_index": 0}
|
||||
assert produced[1].vector == [0.2] * 4
|
||||
assert produced[1].payload == {"file_path": "a", "chunk_index": 1}
|
||||
# ids are UUID strings, distinct
|
||||
assert isinstance(produced[0].id, str)
|
||||
assert produced[0].id != produced[1].id
|
||||
|
||||
|
||||
def test_delete_by_path_uses_filter():
|
||||
|
||||
Reference in New Issue
Block a user