aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christopher Baklid <[email protected]>2018-05-08 23:02:07 +0200
committerGravatar Christopher Baklid <[email protected]>2018-05-08 23:02:07 +0200
commited12c131a06572e7fe1848320cd7f81194dce31c (patch)
tree0e16c975a4d77c932872d469ab562a5c15ff7506
parentaccount for debug mode in unit testing (diff)
account for the FLASK_DEBUG env not being there before running tests
Diffstat (limited to '')
-rw-r--r--app_test.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/app_test.py b/app_test.py
index 27f88164..96900ef3 100644
--- a/app_test.py
+++ b/app_test.py
@@ -6,7 +6,10 @@ from flask import Blueprint
from flask_testing import TestCase
os.environ["BOT_API_KEY"] = "abcdefg" # This is a constant, must be done first
-del os.environ["FLASK_DEBUG"] # Some unit tests fail if this is set
+try:
+ del os.environ["FLASK_DEBUG"] # Some unit tests fail if this is set
+except KeyError:
+ pass
from app import manager
from gunicorn_config import when_ready