浏览代码

change app.count to app.db.count (#620)

David Talson 1 年之前
父节点
当前提交
a662b2a6c6
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 5 5
      tests/vectordb/test_chroma_db.py

+ 5 - 5
tests/vectordb/test_chroma_db.py

@@ -172,21 +172,21 @@ class TestChromaDbCollection(unittest.TestCase):
         app = App(config=AppConfig(collect_metrics=False))
         app.set_collection_name("test_collection_1")
         # Collection should be empty when created
-        self.assertEqual(app.count(), 0)
+        self.assertEqual(app.db.count(), 0)
 
         app.db.collection.add(embeddings=[0, 0, 0], ids=["0"])
         # After adding, should contain one item
-        self.assertEqual(app.count(), 1)
+        self.assertEqual(app.db.count(), 1)
 
         app.set_collection_name("test_collection_2")
         # New collection is empty
-        self.assertEqual(app.count(), 0)
+        self.assertEqual(app.db.count(), 0)
 
         # Adding to new collection should not effect existing collection
         app.db.collection.add(embeddings=[0, 0, 0], ids=["0"])
         app.set_collection_name("test_collection_1")
         # Should still be 1, not 2.
-        self.assertEqual(app.count(), 1)
+        self.assertEqual(app.db.count(), 1)
 
     def test_collections_are_persistent(self):
         """
@@ -202,7 +202,7 @@ class TestChromaDbCollection(unittest.TestCase):
 
         app = App(config=AppConfig(collect_metrics=False))
         app.set_collection_name("test_collection_1")
-        self.assertEqual(app.count(), 1)
+        self.assertEqual(app.db.count(), 1)
 
     def test_parallel_collections(self):
         """