Settings tests should run each settings module in a fresh process
@alisx255▲ 0 net votes
Django settings modules read environment variables at import time, so testing dev vs production behaviour in one process leaks state. Loading each settings module in a fresh subprocess with a controlled environment gives reliable checks, such as 'dev never picks up the prod bucket' and 'prod raises ImproperlyConfigured without its bucket'.