X-Git-Url: https://plomlompom.com/repos/feed.xml?a=blobdiff_plain;f=tests%2Ftodos.py;h=b47834c980a39c0ee7b7ce09f52917f712c6813c;hb=8570f4ce4d44b813a1f02b72c5c45a57d2003bae;hp=7aed5f83a0eee3e2eb50845c42de9fd57e3aee0f;hpb=696aed8a590fa9c67a6b9c723e2134b2663bd769;p=plomtask diff --git a/tests/todos.py b/tests/todos.py index 7aed5f8..b47834c 100644 --- a/tests/todos.py +++ b/tests/todos.py @@ -31,9 +31,9 @@ class TestsWithDB(TestCaseWithDB): todo.save(self.db_conn) self.assertEqual(Todo.by_id(self.db_conn, 1), todo) with self.assertRaises(NotFoundException): - self.assertEqual(Todo.by_id(self.db_conn, 0), todo) + Todo.by_id(self.db_conn, 0) with self.assertRaises(NotFoundException): - self.assertEqual(Todo.by_id(self.db_conn, 2), todo) + Todo.by_id(self.db_conn, 2) def test_Todo_by_date(self) -> None: """Test findability of Todos by date.""" @@ -301,7 +301,6 @@ class TestsWithServer(TestCaseWithServer): def post_and_reload(form_data: dict[str, object], status: int = 302) -> Todo: self.check_post(form_data, '/todo?id=1', status, '/') - self.db_conn.cached_todos = {} return Todo.by_date(self.db_conn, '2024-01-01')[0] # test minimum form_data = {'title': '', 'description': '', 'effort': 1}