Testing with a Real Database

Testing with a Real Database: Testing with a Real, Throwaway Database.

Updated

  1. Testing with a Real, Throwaway Database (Journeyman): API tests that touch a database get a fresh SQLite file in pytest's tmp_path for every test, with the migrations run and a few rows added in a fixture, and app.dependency_overrides swaps get_db for one that opens that file, so the tests run real SQL without ever touching the real data.