diff options
author | 2018-05-08 23:02:07 +0200 | |
---|---|---|
committer | 2018-05-08 23:02:07 +0200 | |
commit | ed12c131a06572e7fe1848320cd7f81194dce31c (patch) | |
tree | 0e16c975a4d77c932872d469ab562a5c15ff7506 | |
parent | account for debug mode in unit testing (diff) |
account for the FLASK_DEBUG env not being there before running tests
-rw-r--r-- | app_test.py | 5 |
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 |