From ed12c131a06572e7fe1848320cd7f81194dce31c Mon Sep 17 00:00:00 2001 From: Christopher Baklid Date: Tue, 8 May 2018 23:02:07 +0200 Subject: account for the FLASK_DEBUG env not being there before running tests --- app_test.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app_test.py') 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 -- cgit v1.2.3