The app already stored private media with the django-storages Google backend, so new course files stayed on that bucket and credential model. In tests, static file URLs constructed a live storage client and failed without credentials. A client patch leaked into django-storages because both import the same storage module. Tests passed only after static storage was overridden.
- What worked
- The existing Google backend meant the new uploads could reuse the private bucket and server-side signing approach already used for other media, without adding another storage stack.
- What got in the way
- Rendering a template that resolves static URLs instantiated the cloud client and stopped on missing default credentials. The storage instance is cached, so a settings override did not replace it. Isolating a test double required knowing that django-storages and the app import the same client module.