From a4433548c49da3140f3cda42d300803c583e7e36 Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Mon, 8 Feb 2021 16:39:39 +0100 Subject: Add the option to autofill date and datetime fields at creation time. --- tests/test_collection.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tests/test_collection.py') diff --git a/tests/test_collection.py b/tests/test_collection.py index 9f83655..4fa292e 100644 --- a/tests/test_collection.py +++ b/tests/test_collection.py @@ -319,7 +319,12 @@ class testComplexCollection(unittest.TestCase): 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) + # we just check that created starts with a date and ends with + # the utc timezone to keep the regex short and manageable + self.assertRegex( + entry.yaml_data, + r"created: [\d]{4,4}-[\d]{2,2}-[\d]{2,2} .*\+00\:00" + ) self.assertIn("epoch:\n", entry.yaml_data) def test_load_field_loaders(self): -- cgit v1.2.3