Skip to content
This repository was archived by the owner on Dec 8, 2022. It is now read-only.

Commit 0b3169c

Browse files
authored
support FLASK_ENV='testing'
1 parent 1c028c4 commit 0b3169c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

application.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66

77
from CodeChallenge import create_app
88

9-
FLASK_ENV = os.environ.get("FLASK_ENV")
9+
FLASK_ENV = os.getenv("FLASK_ENV")
1010

11-
if FLASK_ENV and FLASK_ENV == "development":
11+
if FLASK_ENV == "development":
1212
cfg = "DevelopmentConfig"
13+
elif FLASK_ENV == "testing":
14+
cfg = "TestingConfig"
1315
else:
1416
cfg = "ProductionConfig"
1517

0 commit comments

Comments
 (0)