From 78b9390b2a91235c235eabd1e5dbc002fa28fb93 Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Mon, 8 Feb 2021 10:39:20 +0100 Subject: More tests for empty data --- tests/test_collection.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/test_collection.py') 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 -- cgit v1.2.3