FitTrackee/fittrackee/tests/application/test_config.py

21 lines
685 B
Python
Raw Normal View History

2018-04-09 22:09:58 +02:00
import os
2020-05-10 15:55:56 +02:00
class TestConfig:
def test_development_config(self, app):
app.config.from_object('fittrackee.config.DevelopmentConfig')
2020-05-10 15:55:56 +02:00
assert app.config['DEBUG']
assert not app.config['TESTING']
assert app.config['SQLALCHEMY_DATABASE_URI'] == os.environ.get(
'DATABASE_URL'
)
2018-04-09 22:09:58 +02:00
2020-05-10 15:55:56 +02:00
def test_testing_config(self, app):
app.config.from_object('fittrackee.config.TestingConfig')
2020-05-10 15:55:56 +02:00
assert app.config['DEBUG']
assert app.config['TESTING']
assert not app.config['PRESERVE_CONTEXT_ON_EXCEPTION']
assert app.config['SQLALCHEMY_DATABASE_URI'] == os.environ.get(
'DATABASE_TEST_URL'
)