Python task manager from scratch, part 24: Supporting Task modification
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:
- Added an abstract method to
TaskRepository
to support updating a task. - Implemented that method in
TextFileTaskRepository
. - Modified the
Task
object to support modification (which is incompatible withfrozen=True
) and still support equality testing (now done by comparing UUIDs). - Wrote and modified tests accordingly.
- Ran the Web server and played with it a bit.
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.
Here's the current commit from the veery/
repository.