blob: dbcd8aec71043b081631cdfda2559336b68124ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
from tutorial import models
def test_my_view_success(testapp, dbsession):
model = models.MyModel(name='one', value=55)
dbsession.add(model)
dbsession.flush()
res = testapp.get('/', status=200)
assert res.body
def test_notfound(testapp):
res = testapp.get('/badurl', status=404)
assert res.status_code == 404
|