New job uses FastAPI, so I'm getting more in-depth on it. And I have a testing q...

@ubernostrum@infosec.exchange

New job uses FastAPI, so I'm getting more in-depth on it. And I have a testing question: if I want to have something in the dependency chain that changes on every test (in my case, a DB URL since I'm using cheap per-test ephemeral databases for isolation), what's the approved mechanism for that?

The dependency_overrides API appears to only be for a single global override (assuming I'm reading it correctly), and while there are some per-test-override packages out there they all seem to be abandonware.

(and yes, I could refactor the test DB stuff to do a single DB and transaction per test like Django does, but that'd be a significant amount of work that I'd rather avoid if possible)