summaryrefslogtreecommitdiff
path: root/docs/narr/myproject/tests/test_views.py
diff options
context:
space:
mode:
authorÉric Araujo <earaujo@caravan.coop>2020-01-16 16:11:18 -0500
committerÉric Araujo <earaujo@caravan.coop>2020-01-16 16:11:18 -0500
commitb102650f3ba20d3153ddff005d49f8c33fef8886 (patch)
treeef36934735de9509f6d660782aedd9233382e865 /docs/narr/myproject/tests/test_views.py
parentd741e9baca9c6aa76158341aae4b4310b3745b7b (diff)
parent9c153e1250e00faa06003c10c3a26886489e6210 (diff)
downloadpyramid-b102650f3ba20d3153ddff005d49f8c33fef8886.tar.gz
pyramid-b102650f3ba20d3153ddff005d49f8c33fef8886.tar.bz2
pyramid-b102650f3ba20d3153ddff005d49f8c33fef8886.zip
merge master
Diffstat (limited to 'docs/narr/myproject/tests/test_views.py')
-rw-r--r--docs/narr/myproject/tests/test_views.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/narr/myproject/tests/test_views.py b/docs/narr/myproject/tests/test_views.py
new file mode 100644
index 000000000..1fd9db8ab
--- /dev/null
+++ b/docs/narr/myproject/tests/test_views.py
@@ -0,0 +1,13 @@
+from myproject.views.default import my_view
+from myproject.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'] == 'myproject'
+
+def test_notfound_view(app_request):
+ info = notfound_view(app_request)
+ assert app_request.response.status_int == 404
+ assert info == {}