-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_config.py
31 lines (21 loc) · 969 Bytes
/
test_config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#! ../env/bin/python
# -*- coding: utf-8 -*-
from flask_app import create_app
class TestConfig:
def test_dev_config(self):
""" Tests if the development config loads correctly """
app = create_app('settings.DevConfig')
assert app.config['DEBUG'] is True
assert app.config['SQLALCHEMY_DATABASE_URI'] == 'mysql+pymysql://'
assert app.config['CACHE_TYPE'] == 'null'
def test_test_config(self):
""" Tests if the test config loads correctly """
app = create_app('settings.TestConfig')
assert app.config['DEBUG'] is True
assert app.config['SQLALCHEMY_ECHO'] is True
assert app.config['CACHE_TYPE'] == 'null'
def test_prod_config(self):
""" Tests if the production config loads correctly """
app = create_app('settings.ProdConfig')
assert app.config['SQLALCHEMY_DATABASE_URI'] == 'mysql+pymysql://'
assert app.config['CACHE_TYPE'] == 'simple'