aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/test_collection.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/test_collection.py b/tests/test_collection.py
index 4668096..f7ee31f 100644
--- a/tests/test_collection.py
+++ b/tests/test_collection.py
@@ -130,8 +130,9 @@ class testEmptyCollection(unittest.TestCase):
def test_loaded(self):
self.assertEqual(self.collection.settings, {})
- self.collection.update_cache()
+ indexed = self.collection.update_cache()
self.assertIsNotNone(self.collection.stemmer)
+ self.assertEqual(indexed, 0)
class testSimpleCollection(unittest.TestCase):
@@ -151,8 +152,9 @@ class testSimpleCollection(unittest.TestCase):
self.assertEqual(len(self.collection.settings['fields']), 7)
self.assertEqual(len(self.collection.indexed_fields), 3)
- self.collection.update_cache()
+ indexed = self.collection.update_cache()
self.assertIsNotNone(self.collection.stemmer)
+ self.assertEqual(indexed, 3)
def test_full_search(self):
self.collection.start_search('Item')
@@ -221,7 +223,8 @@ class testSimpleCollection(unittest.TestCase):
self.assertIn("non_existing_file", cm.output[0])
def test_index_reset(self):
- self.collection.update_cache(reset=True)
+ indexed = self.collection.update_cache(reset=True)
+ self.assertEqual(indexed, 3)
def test_get_entry_missing_eid(self):
entry = self.collection.entry_from_eid('this is not an eid')