Given our plan for modifying our Web frontend to support completing tasks and our repository backend to support all CRUD operations, some of our next steps are straightforward. In this commit I:
TaskRepositoryto support updating a task.
Taskobject to support modification (which is incompatible with
frozen=True) and still support equality testing (now done by comparing UUIDs).
You'll notice there are some other changes in this commit. Running the Web server and playing with the results revealed a bug in the date-parsing logic (I wasn't handling the case where no due datetime was submitted) and some ugliness in the
Task string representation.
Where you're finding bugs by actually running the Web server, that suggests that (i) there's too much going on in the functions your Web framework is decorating and/or (ii) there are holes in your test coverage. Here it's probably both.
Next post: Python task manager from scratch, part 25: Handling a bug