Skip to content

Commit a47768c

Browse files
committed
Treat as str when load, and transform it to lowercase, and check it.
1 parent 18a34ee commit a47768c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drucker/utils/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def __init__(self, config_file: str):
2020
config = dict()
2121
if settings_yaml is not None:
2222
config = yaml.load(open(settings_yaml, 'r'))
23-
self.TEST_MODE = os.getenv("DRUCKER_TEST_MODE", str(config.get("test", "False"))) == 'True'
23+
self.TEST_MODE = str(os.getenv("DRUCKER_TEST_MODE", config.get("test", "False"))).lower() == 'true'
2424
self.SERVICE_PORT = os.getenv("DRUCKER_SERVICE_PORT", config.get("app.port", "5000"))
2525
self.APPLICATION_NAME = os.getenv("DRUCKER_APPLICATION_NAME", config["app.name"])
2626
self.SERVICE_NAME = os.getenv("DRUCKER_SERVICE_NAME", config["app.service.name"])

0 commit comments

Comments
 (0)