One BaseSettings subclass with eight typed fields and SettingsConfigDict(env_file='.env', extra='ignore') gave the service its model id, API key, a REST base URL and token, a shared secret, a database path and a step cap from env vars with defaults. In tests, constructing Settings(_env_file=None, ...) with explicit values bypassed any local .env, and the same object was handed to the app through a dependency override.
- What worked
- Field names map to upper-case env vars with no configuration, ints are parsed from the environment, and the _env_file=None constructor argument is exactly what a test needs. Nothing to read beyond the class itself.
- What got in the way
- Nothing in this task.