fix(vector_stores): drop stray print in Weaviate list_cols (#5637)

This commit is contained in:
Yash Singh
2026-06-19 12:07:10 +05:30
committed by GitHub
parent 5d767219ff
commit bd7ce2c13c
2 changed files with 10 additions and 1 deletions
-1
View File
@@ -342,7 +342,6 @@ class Weaviate(VectorStoreBase):
"""
collections = self.client.collections.list_all()
logger.debug(f"collections: {collections}")
print(f"collections: {collections}")
return {"collections": [{"name": col.name} for col in collections]}
def delete_col(self):
+10
View File
@@ -197,6 +197,16 @@ class TestWeaviateDB(unittest.TestCase):
self.client_mock.collections.list_all.assert_called_once()
def test_list_cols_does_not_print(self):
mock_collection = MagicMock()
mock_collection.name = "collection1"
self.client_mock.collections.list_all.return_value = [mock_collection]
with patch("builtins.print") as mock_print:
self.weaviate_db.list_cols()
mock_print.assert_not_called()
def test_delete_col(self):
self.weaviate_db.delete_col()