summaryrefslogtreecommitdiff
path: root/docs/tutorials/wiki/src/models/tests/test_views.py
blob: c2e28dd6378dc04bcc87ca1622cb4f1b1c5e21bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
from tutorial.views.default import my_view
from tutorial.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'] == 'tutorial'

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