diff --git a/BookingSystem/app.py b/BookingSystem/app.py index e81d4c0..1d2943d 100644 --- a/BookingSystem/app.py +++ b/BookingSystem/app.py @@ -136,6 +136,8 @@ def debug_login() -> flask.Response: # We need to create an app object for gunicorn to use with the routine tasks only running on the main thread, not the # workers. But since gunicorn doesn't run on Windows we need to catch the exception and run the app normally try: + if os.environ.get('TESTING', 'false').lower() == 'true': + raise Exception('Testing environment, skipping gunicorn') import gunicorn.app.base