forked from orbit-oss/flask
rewrite tutorial docs and example
This commit is contained in:
parent
16d83d6bb4
commit
c3dd7b8e4c
103 changed files with 3327 additions and 2224 deletions
12
examples/tutorial/tests/test_factory.py
Normal file
12
examples/tutorial/tests/test_factory.py
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
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!'
|
||||
Loading…
Add table
Add a link
Reference in a new issue