From 04581b9c73178010115a85679a8e0e9993e6402d Mon Sep 17 00:00:00 2001 From: Mohammad Amin Date: Mon, 20 May 2024 12:28:25 +0330 Subject: [PATCH] fix: qdrant properties! qdrant engine had different property from pg engine we had earlier! --- .../{test_base_engine.py => test_base_qdrant_engine.py} | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) rename tests/unit/{test_base_engine.py => test_base_qdrant_engine.py} (70%) diff --git a/tests/unit/test_base_engine.py b/tests/unit/test_base_qdrant_engine.py similarity index 70% rename from tests/unit/test_base_engine.py rename to tests/unit/test_base_qdrant_engine.py index 14dd60e..b3bca46 100644 --- a/tests/unit/test_base_engine.py +++ b/tests/unit/test_base_qdrant_engine.py @@ -3,7 +3,7 @@ from utils.query_engine.base_qdrant_engine import BaseQdrantEngine -class TestBaseEngine(TestCase): +class TestBaseQdrantEngine(TestCase): def test_setup_vector_store_index(self): """ Tests that _setup_vector_store_index creates a PGVectorAccess object @@ -19,6 +19,7 @@ def test_setup_vector_store_index(self): testing=True, ) - expected_dbname = f"community_{community_id}" - self.assertIn(expected_dbname, base_engine.vector_store.connection_string) - self.assertEqual(base_engine.vector_store.table_name, platform_table_name) + expected_collection_name = f"{community_id}_{platform_table_name}" + self.assertEqual( + base_engine.vector_store.collection_name, expected_collection_name + )