Add basic and user model testing.

This commit is contained in:
Stephan Porada
2019-07-08 10:52:36 +02:00
parent 8e86e0a0e9
commit adec45989c
5 changed files with 59 additions and 2 deletions

View File

@ -18,7 +18,11 @@ class DevelopmentConfig(Config):
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'data_dev.sqlite')
# class TestingConfig(Config):
class TestingConfig(Config):
TESTING = True
SQLALCHEMY_DATABASE_URI = os.environ.get('TEST_DATABASE_URL') or \
'sqlite://'
WTF_CSRF_ENABLED = False
# class ProductionConfig(Config):
@ -26,7 +30,7 @@ class DevelopmentConfig(Config):
config = {
'development': DevelopmentConfig,
# 'testing': TestingConfig,
'testing': TestingConfig,
# 'production': ProductionConfig,
'default': DevelopmentConfig