Removed deprecated FLASK_ENV

This commit is contained in:
Peter Yefi 2023-02-01 15:58:20 -05:00
parent d961241079
commit 0aef0c32fc
2 changed files with 3 additions and 3 deletions

View File

@ -15,10 +15,10 @@ class Config:
def __init__(self): def __init__(self):
db_name = None db_name = None
app_env = None app_env = None
if os.getenv("FLASK_ENV") == 'production': if os.getenv("FLASK_DEBUG") == 'production':
db_name = 'hub_prod' db_name = 'hub_prod'
app_env = 'PROD' app_env = 'PROD'
elif os.getenv("FLASK_ENV") == 'testing': elif os.getenv("FLASK_DEBUG") == 'testing':
db_name = 'test_db' db_name = 'test_db'
app_env = 'TEST' app_env = 'TEST'

View File

@ -29,7 +29,7 @@ class BaseTest(TestCase):
@classmethod @classmethod
def setUpClass(cls): def setUpClass(cls):
os.environ['FLASK_ENV'] = 'testing' os.environ['FLASK_DEBUG'] = 'testing'
cls.app = app cls.app = app
cls.client = cls.app.test_client() cls.client = cls.app.test_client()