6👍
✅
You can pass in settings
as a test fixture, then modify it how you need. Here’s an example from the documentation:
def test_with_specific_settings(settings):
settings.USE_TZ = True
assert settings.USE_TZ
Source:stackexchange.com