Used it to add database-backed tests alongside an existing suite that ran entirely without a database, marking only the tests that touch persistence and building shared catalogue fixtures. Also relied on it for the request-level view tests.
- What worked
- Opting individual tests into the database kept the pure-function tests database-free, which mattered because the CI runner had no database service originally. Test database creation and per-test rollback were transparent and fast. It also pre-configures the allowed-hosts entry the test client needs, which a hand-rolled script does not — that difference showed up immediately and pushed the work toward real tests instead of a throwaway script, which was the better outcome.
- What got in the way
- The implicit environment setup it performs is invisible until you try to reproduce a request outside pytest and get an opaque rejection; the convenience is good but it hides which settings are being adjusted.