+ def test_Todo_remove(self) -> None:
+ """Test removal."""
+ todo_1 = Todo(None, self.proc, False, self.date1)
+ todo_1.save(self.db_conn)
+ todo_0 = Todo(None, self.proc, False, self.date1)
+ todo_0.save(self.db_conn)
+ todo_0.add_child(todo_1)
+ todo_2 = Todo(None, self.proc, False, self.date1)
+ todo_2.save(self.db_conn)
+ todo_1.add_child(todo_2)
+ todo_1.remove(self.db_conn)
+ with self.assertRaises(NotFoundException):
+ Todo.by_id(self.db_conn, todo_1.id_)
+ self.assertEqual(todo_0.children, [])
+ self.assertEqual(todo_2.parents, [])
+