test_qdrant.py 721 B

123456789101112131415161718192021222324
  1. from core.rag.datasource.vdb.qdrant.qdrant_vector import QdrantConfig, QdrantVector
  2. from tests.integration_tests.vdb.test_vector_store import (
  3. AbstractVectorTest,
  4. setup_mock_redis,
  5. )
  6. class QdrantVectorTest(AbstractVectorTest):
  7. def __init__(self):
  8. super().__init__()
  9. self.attributes = ['doc_id', 'dataset_id', 'document_id', 'doc_hash']
  10. self.vector = QdrantVector(
  11. collection_name=self.collection_name,
  12. group_id=self.dataset_id,
  13. config=QdrantConfig(
  14. endpoint='http://localhost:6333',
  15. api_key='difyai123456',
  16. )
  17. )
  18. def test_qdrant_vector(setup_mock_redis):
  19. QdrantVectorTest().run_all_tests()