Our tests are sporadic, poorly laid out, and incomplete. We need to rethink and restructure them - this work needs to start with a review of the current situation and the best path forward for improving it.
We're already aware of the following issues, as a starting point:
- Emails have poor test coverage (previously tracked at T196620)
- Our test arrangement may not be ideal - each app has a single `tests.py` file that is often many thousands of lines long.
- We could be using request-mocking, using something like [[ https://github.com/kevin1024/vcrpy | VCR ]], to improve our test coverage of external dependencies.
From this spike, we would like to understand:
- Which areas of the code are _missing_ test coverage?
- How could we improve the structure and content of our tests to improve coverage and make future test writing easier?