From 6ad5f721203502662c3e7fd1ff7fe57e91a5dba5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Nut=CC=A6iu?= Date: Sat, 15 Apr 2017 23:54:31 +0300 Subject: [PATCH] updating config.py --- src/config.lock.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/config.lock.py b/src/config.lock.py index 7f5025d..fabbd1c 100644 --- a/src/config.lock.py +++ b/src/config.lock.py @@ -35,7 +35,6 @@ class DevelopmentConfig(Config): @staticmethod def init_app(app): with app.app_context(): - print("Creating a fresh database") db.drop_all() db.create_all() @@ -46,7 +45,13 @@ class ProductionConfig(Config): class TestingConfig(Config): - pass + SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'database.sqlite') + + @staticmethod + def init_app(app): + with app.app_context(): + db.drop_all() + db.create_all() config = { 'development': DevelopmentConfig,