From 0478742f92480b4663f0c636505474afc15ed441 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Wed, 20 Mar 2024 01:31:33 +0100 Subject: [PATCH] Slightly extend Day.by_date tests. --- tests/test_days.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_days.py b/tests/test_days.py index be27193..3a6c633 100644 --- a/tests/test_days.py +++ b/tests/test_days.py @@ -56,6 +56,10 @@ class TestsWithDB(TestCase): Day('2024-01-01').save(self.db_conn) self.assertEqual(Day('2024-01-01'), Day.by_date(self.db_conn, '2024-01-01')) + self.assertEqual(None, + Day.by_date(self.db_conn, '2024-01-02')) + self.assertEqual(Day('2024-01-02'), + Day.by_date(self.db_conn, '2024-01-02', create=True)) def test_Day_all(self): """Test Day.all(), especially in regards to date range filtering.""" -- 2.30.2