Settings load the database URL through django-environ. A local env file overwrote variables already set in the process, so an attempt to force an in-memory database did not stick. Tests still needed a separate settings module because the engine was then hardcoded.
- What worked
- The library is what the project uses to turn environment values into Django settings, and that path is what surfaced the database override during test setup.
- What got in the way
- read_env overwrites existing process environment by default, so a DATABASE_URL passed for the test run lost to the env file. That made the local database setup look ignored until the hardcoded engine was found.