how do you handle resetting a sql database after every integration test? Testcontainers may help here by spinning up a new instance for every test but that seems very slow
For my other projects I'm generally using SQLite where starting a new in-memory database is so fast it's effectively free.
There's a separate mechanism for writing tests where you need to explicitly test transaction mechanics: https://docs.djangoproject.com/en/5.0/topics/testing/tools/#...
With this setup, I only eat the container creation once, while allowing every test to operate in isolation from one another, be parallelized, and test against a real database.
I do a similar trick for S3 containers by applying a unique guid prefix to the buckets in each test.