diff options
author | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2021-02-08 10:39:20 +0100 |
---|---|---|
committer | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2021-02-08 10:39:20 +0100 |
commit | 78b9390b2a91235c235eabd1e5dbc002fa28fb93 (patch) | |
tree | 71a4fe35b2949a991257666b9dc03881c5529aa1 /tests/test_collection.py | |
parent | 61d154920d158767dc2b29bf9239f74d0dcdc751 (diff) |
More tests for empty data
Diffstat (limited to 'tests/test_collection.py')
-rw-r--r-- | tests/test_collection.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/test_collection.py b/tests/test_collection.py index 1e37589..9f83655 100644 --- a/tests/test_collection.py +++ b/tests/test_collection.py @@ -289,7 +289,7 @@ class testComplexCollection(unittest.TestCase): self.collection.settings['name'], "Fully featured lesana collection", ) - self.assertEqual(len(self.collection.settings['fields']), 10) + self.assertEqual(len(self.collection.settings['fields']), 12) self.assertIsNotNone(self.collection.stemmer) self.assertEqual(len(self.collection.indexed_fields), 8) @@ -317,6 +317,10 @@ class testComplexCollection(unittest.TestCase): self.assertIn("name: ''", entry.yaml_data) self.assertIn('with_default', entry.yaml_data) self.assertIn('amount: 0', entry.yaml_data) + self.assertIn("tags: []", entry.yaml_data) + self.assertIn("exists:\n", entry.yaml_data) + self.assertIn("created:\n", entry.yaml_data) + self.assertIn("epoch:\n", entry.yaml_data) def test_load_field_loaders(self): # Check that all fields have been loaded, with the right types |