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 +}