From f44e855f0462b105f54a0dea826e6fdcd60925db Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Sat, 15 Dec 2018 18:48:57 +0100 Subject: Added new data type: boolean --- tests/test_collection.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'tests/test_collection.py') diff --git a/tests/test_collection.py b/tests/test_collection.py index 66f034a..d1d6455 100644 --- a/tests/test_collection.py +++ b/tests/test_collection.py @@ -259,9 +259,9 @@ class testComplexCollection(unittest.TestCase): self.collection.settings['name'], "Fully featured lesana collection" ) - 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), 5) + self.assertEqual(len(self.collection.indexed_fields), 6) def test_index(self): self.collection.update_cache() @@ -275,6 +275,12 @@ class testComplexCollection(unittest.TestCase): for m in matches: self.assertIsInstance(m, lesana.Entry) + def test_boolean_field(self): + entry = self.collection.entry_from_uid( + '73097121f1874a6ea2f927db7dc4f11e' + ) + self.assertIsInstance(entry.data['exists'], bool) + class testCollectionWithErrors(unittest.TestCase): @classmethod -- cgit v1.2.3