home · contact · privacy
Use same date ranging code for Day and Todo filtering.
[plomtask] / tests / todos.py
index 4ba5a1c6ee4643ef673653661579740219f80081..86986b6486ce6fe0ed75a34284daf57175de1d54 100644 (file)
@@ -63,7 +63,8 @@ class TestsWithDB(TestCaseWithDB):
         t2.save(self.db_conn)
         self.assertEqual(Todo.by_date(self.db_conn, self.date1), [t1, t2])
         self.assertEqual(Todo.by_date(self.db_conn, self.date2), [])
-        self.assertEqual(Todo.by_date(self.db_conn, 'foo'), [])
+        with self.assertRaises(BadFormatException):
+            self.assertEqual(Todo.by_date(self.db_conn, 'foo'), [])
 
     def test_Todo_on_conditions(self) -> None:
         """Test effect of Todos on Conditions."""