Tests pass now.
This commit is contained in:
parent
961db8ad72
commit
8fa5e32d9a
24 changed files with 421 additions and 530 deletions
33
examples/blueprintexample/test_blueprintexample.py
Normal file
33
examples/blueprintexample/test_blueprintexample.py
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Blueprint Example Tests
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
Tests the Blueprint example app
|
||||
"""
|
||||
import pytest
|
||||
|
||||
import blueprintexample
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def client():
|
||||
return blueprintexample.app.test_client()
|
||||
|
||||
|
||||
def test_urls(client):
|
||||
r = client.get('/')
|
||||
assert r.status_code == 200
|
||||
|
||||
r = client.get('/hello')
|
||||
assert r.status_code == 200
|
||||
|
||||
r = client.get('/world')
|
||||
assert r.status_code == 200
|
||||
|
||||
# second blueprint instance
|
||||
r = client.get('/pages/hello')
|
||||
assert r.status_code == 200
|
||||
|
||||
r = client.get('/pages/world')
|
||||
assert r.status_code == 200
|
||||
Loading…
Add table
Add a link
Reference in a new issue