Help with parallel FastAPI / Python testing with real DB

Posted by OkWater4180@reddit | learnprogramming | View on Reddit | 4 comments

Would like to see if there is a common setup / library for parallel testing with DB access.

Our tests have access to the real postgres DB - when run locally, use same as dev DB. In CI, use the sidecar postgres.

At the start, all alembic revisions are run to bring the schema up to date.

Then per function, the table data is deleted and the function is run.

I'd like to make this parallelizable.

I know Django has this built into it.