Can not access Environment Variables specified on Django Tests in sub-tests
I have a high level Django test that runs at the project-level and has the Environment variables needed specified in the Configuration tab of Run/Debug Configurations.
When I try to run an individual class from any app's test file or even a test method in a class, the environment variables are not automatically loaded into that test's run / debug configuration. I have to copy / paste them in every time.
I've tried settings these at a project level, and I can not figure out why these are not being inherited.
How do I make new test runs (individual runs) automatically pick up a specific set of environment variables I've specified?
Please sign in to leave a comment.
I believe the correct way to handle this is to use a custom test runner that specifies env vars at runtime.
Edit, actually no, because this would still require the secrets be checked in :P