blob: 4045871dad3d590730e7aaafdc5f059eaf7015d4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
from sqla_demo 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
|