flask/examples/tutorial/tests/test_factory.py

13 lines
298 B
Python
Raw Normal View History

2018-02-10 06:39:05 +08:00
from flaskr import create_app
def test_config():
"""Test create_app without passing test config."""
assert not create_app().testing
assert create_app({'TESTING': True}).testing
def test_hello(client):
response = client.get('/hello')
assert response.data == b'Hello, World!'