mirror of https://github.com/mitsuhiko/flask.git
wgwz
8 years ago
9 changed files with 13 additions and 0 deletions
@ -0,0 +1,12 @@ |
|||||||
|
from yourapplication import app |
||||||
|
import pytest |
||||||
|
|
||||||
|
@pytest.fixture |
||||||
|
def client(request): |
||||||
|
app.config['TESTING'] = True |
||||||
|
client = app.test_client() |
||||||
|
return client |
||||||
|
|
||||||
|
def test_index(client): |
||||||
|
rv = client.get('/') |
||||||
|
assert b"Hello World!" in rv.data |
Loading…
Reference in new issue