summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2021-01-10 11:38:12 +0100
committerElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2021-01-10 11:38:12 +0100
commit9ee3f01e454d1d56b5f0a31b30bbc8a5a2f50469 (patch)
tree657ee525515f439561b15c320af6a433b331461f /tests
parent98a1295f76677ffffb640dfb534c398da1265e9e (diff)
Test that all entries are indexed
Diffstat (limited to 'tests')
-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')