From: Christian Heller Date: Wed, 20 Mar 2024 00:31:33 +0000 (+0100) Subject: Slightly extend Day.by_date tests. X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/static/tasks?a=commitdiff_plain;h=0478742f92480b4663f0c636505474afc15ed441;p=plomtask Slightly extend Day.by_date tests. --- 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."""