Tests - minor refactor
This commit is contained in:
20
fittrackee/tests/application/test_config.py
Normal file
20
fittrackee/tests/application/test_config.py
Normal file
@ -0,0 +1,20 @@
|
||||
import os
|
||||
|
||||
|
||||
class TestConfig:
|
||||
def test_development_config(self, app):
|
||||
app.config.from_object('fittrackee.config.DevelopmentConfig')
|
||||
assert app.config['DEBUG']
|
||||
assert not app.config['TESTING']
|
||||
assert app.config['SQLALCHEMY_DATABASE_URI'] == os.environ.get(
|
||||
'DATABASE_URL'
|
||||
)
|
||||
|
||||
def test_testing_config(self, app):
|
||||
app.config.from_object('fittrackee.config.TestingConfig')
|
||||
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'
|
||||
)
|
Reference in New Issue
Block a user