I finally managed to get it.
At the beginning of my test file:
import sys
class FakeGlobalConfig:
def __init__(self):
self.ProjectName = ""
class FakeSettings:
def __init__(self):
self.global_config = FakeGlobalConfig()
import project.Settings
sys.modules["project.Settings"].Settings = FakeSettings
That's been placed at the very beginning, before anything else.
With that, we override the real `Settings` class and set the attributes we need.