summaryrefslogtreecommitdiff
path: root/docs/quick_tour/logging/tests/test_views.py
blob: 0b019fe825e15fcede8380e16eb92b00be305008 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
from hello_world.views.default import my_view
from hello_world.views.notfound import notfound_view


def test_my_view(app_request):
    info = my_view(app_request)
    assert app_request.response.status_int == 200
    assert info['project'] == 'hello_world'

def test_notfound_view(app_request):
    info = notfound_view(app_request)
    assert app_request.response.status_int == 404
    assert info == {}