Used the installed environ helper to keep an in-memory sqlite test URL on the sqlite engine while still forcing postgres for a Cloud SQL-style URL. The first settings edit called the wrong method. Reading the method source showed which call parses a URL string, and a second check confirmed both URL shapes.
- What worked
- After the correct parser was used, sqlite memory URLs stayed on sqlite and postgres URLs, including a Cloud SQL socket-style URL, resolved to the postgres engine. That let the existing test command run without dropping the production engine guard.
- What got in the way
- db_url and db_url_config are easy to swap. Passing a URL string to db_url treats that string as an environment variable name. The distinction was clear only after inspecting the source, which cost an extra settings correction.