aboutsummaryrefslogtreecommitdiff
path: root/tests/test_views.py
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2022-07-07 12:31:49 +0200
committerDaniel Schadt <kingdread@gmx.de>2022-07-07 12:31:49 +0200
commitaebf11a0cf6141f287fcbe40fbb094eeb702ec2a (patch)
tree39b8035bb825657cd90fb00c3a72e949cb6022ba /tests/test_views.py
parent2cf5859a0bdb8771a73cd8fd65a45da5503cf184 (diff)
downloadfietsboek-aebf11a0cf6141f287fcbe40fbb094eeb702ec2a.tar.gz
fietsboek-aebf11a0cf6141f287fcbe40fbb094eeb702ec2a.tar.bz2
fietsboek-aebf11a0cf6141f287fcbe40fbb094eeb702ec2a.zip
start adding some unit tests
Diffstat (limited to 'tests/test_views.py')
-rw-r--r--tests/test_views.py23
1 files changed, 0 insertions, 23 deletions
diff --git a/tests/test_views.py b/tests/test_views.py
deleted file mode 100644
index 08347b6..0000000
--- a/tests/test_views.py
+++ /dev/null
@@ -1,23 +0,0 @@
-from fietsboek import models
-from fietsboek.views.default import my_view
-from fietsboek.views.notfound import notfound_view
-
-
-def test_my_view_failure(app_request):
- info = my_view(app_request)
- assert info.status_int == 500
-
-def test_my_view_success(app_request, dbsession):
- model = models.MyModel(name='one', value=55)
- dbsession.add(model)
- dbsession.flush()
-
- info = my_view(app_request)
- assert app_request.response.status_int == 200
- assert info['one'].name == 'one'
- assert info['project'] == 'fietsboek'
-
-def test_notfound_view(app_request):
- info = notfound_view(app_request)
- assert app_request.response.status_int == 404
- assert info == {}