Skip to content
Myr

test_blueprintexample.py

This file

Path

examples/blueprintexample/test_blueprintexample.py

33 lines · 606 bytes · Python

Last changed by

Merge pull request #1165 from untitaker/new_testsuiteMarkus Unterwaditzerbefore adoptionbb94a61

History of this file

Take it

1# -*- coding: utf-8 -*-2"""3    Blueprint Example Tests4    ~~~~~~~~~~~~~~56    Tests the Blueprint example app7"""8import pytest910import blueprintexample111213@pytest.fixture14def client():15    return blueprintexample.app.test_client()161718def test_urls(client):19    r = client.get('/')20    assert r.status_code == 2002122    r = client.get('/hello')23    assert r.status_code == 2002425    r = client.get('/world')26    assert r.status_code == 2002728    # second blueprint instance29    r = client.get('/pages/hello')30    assert r.status_code == 2003132    r = client.get('/pages/world')33    assert r.status_code == 200