From 9eb4d5ada04d8b0b8e419e1baf6ef563a694b646 Mon Sep 17 00:00:00 2001 From: Joachim Lusiardi Date: Fri, 24 Nov 2017 09:08:37 +0100 Subject: [PATCH] fixup! preparation commit for henni --- config.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/config.py b/config.py index b9f64e2..e6bb6d3 100644 --- a/config.py +++ b/config.py @@ -1,4 +1,5 @@ import os + basedir = os.path.abspath(os.path.dirname(__file__)) @@ -32,12 +33,15 @@ class DevelopmentConfig(Config): class TestingConfig(Config): - TESTING = True - SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'data_testing.sqlite') + SECURITY_SEND_REGISTER_EMAIL = False + DEBUG = True + SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:{p}@{h}/pitstops'.format(p=os.environ.get('MYSQL_PASSWORD'), + h=os.environ.get('MYSQL_HOST')) class ProductionConfig(Config): - SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:%s@database/pitstops' % (os.environ.get('DATABASE_ENV_MYSQL_ROOT_PASSWORD')) + SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:{h}@database/pitstops'.format( + h=os.environ.get('DATABASE_ENV_MYSQL_ROOT_PASSWORD')) config = { @@ -45,4 +49,4 @@ config = { 'testing': TestingConfig, 'production': ProductionConfig, 'default': DevelopmentConfig -} \ No newline at end of file +}