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:

  1. Added an abstract method to TaskRepository to support updating a task.
  2. Implemented that method in TextFileTaskRepository.
  3. Modified the Task object to support modification (which is incompatible with frozen=True) and still support equality testing (now done by comparing UUIDs).
  4. Wrote and modified tests accordingly.
  5. 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.

Next post: Python task manager from scratch, part 25: Handling a bug

Home page