summaryrefslogtreecommitdiff
path: root/tests/test_collection.py
diff options
context:
space:
mode:
authorElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2020-02-09 18:28:46 +0100
committerElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2020-02-09 18:28:46 +0100
commit6a11672f9b3a0b4b48843ff5e39daae1f0e5ea89 (patch)
tree01df884ac1e3e3d3238d603b7ce26d669cb35434 /tests/test_collection.py
parenta96b3e1f7acac3cc7bd0ae74be411e97fc27912c (diff)
Fail validation for entries with empty list fields
Diffstat (limited to 'tests/test_collection.py')
-rw-r--r--tests/test_collection.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_collection.py b/tests/test_collection.py
index 798e561..e97e912 100644
--- a/tests/test_collection.py
+++ b/tests/test_collection.py
@@ -54,8 +54,8 @@ class testCollection(unittest.TestCase):
self.assertIsNotNone(self.collection.settings)
self.assertIsNotNone(self.collection.stemmer)
# Fields with no "index" entry are not indexed
- self.assertEqual(len(self.collection.settings['fields']), 6)
- self.assertEqual(len(self.collection.indexed_fields), 1)
+ self.assertEqual(len(self.collection.settings['fields']), 7)
+ self.assertEqual(len(self.collection.indexed_fields), 3)
def test_load_safe(self):
self.collection = lesana.Collection('tests/data/simple')
@@ -326,9 +326,9 @@ class testCollectionWithErrors(unittest.TestCase):
self.collection.settings['name'],
"Lesana collection with certain errors"
)
- self.assertEqual(len(self.collection.settings['fields']), 6)
+ self.assertEqual(len(self.collection.settings['fields']), 7)
self.assertIsNotNone(self.collection.stemmer)
- self.assertEqual(len(self.collection.indexed_fields), 1)
+ self.assertEqual(len(self.collection.indexed_fields), 3)
def test_index(self):
loaded = self.collection.update_cache()