mirror of
https://github.com/shouptech/flask-tutorial.git
synced 2026-02-03 07:29:42 +00:00
19 lines
354 B
Python
19 lines
354 B
Python
import pytest
|
|
|
|
from flaskr import create_app
|
|
from flaskr.exceptions import ConfigError
|
|
|
|
|
|
@pytest.mark.parametrize('config', (
|
|
{},
|
|
{'SECRET_KEY':'test'}
|
|
))
|
|
def test_bad_config(config):
|
|
try:
|
|
create_app(config).testing
|
|
assert False
|
|
except ConfigError:
|
|
assert True
|
|
|
|
def test_good_config():
|
|
assert create_app(None)
|