import os
from dotenv import load_dotenv
load_dotenv(override=True)
FOCUSTUI_DEBUG: bool = os.getenv("FOCUSTUI_DEBUG") == "True"
_minute = os.getenv("FOCUSTUI_DEBUG_MINUTE")
is_custom = FOCUSTUI_DEBUG and _minute is not None
MINUTE: int = int(_minute) if is_custom else 60
This part of the constants from my app. As you see, this data can be changed by .env file. When I am working on an app, I set, for example, debug to True.
I want my unit tests to work against normal mode (debug=False). But when I import data from constants, debug is set already set to True, so monkeypatch.setenv("FOCUSTUI_DEBUG", "False") does not work.
How do design my app to make it easy to test and easy to write?
Or I just should manually set .env debug to True?
