diff options
| author | Steve Piercy <web@stevepiercy.com> | 2021-01-09 08:05:34 -0800 |
|---|---|---|
| committer | Steve Piercy <web@stevepiercy.com> | 2021-01-09 08:05:34 -0800 |
| commit | 6326c7ca69a5ee53a27f36ce7eec4784efaef345 (patch) | |
| tree | c395a2810a157c51eae3be086e5a9fe5f4ec7177 /docs/quick_tour/sessions/tests/test_views.py | |
| parent | 4d5d68db549c2ed297ba83679cf7ceb5169eaab3 (diff) | |
| download | pyramid-6326c7ca69a5ee53a27f36ce7eec4784efaef345.tar.gz pyramid-6326c7ca69a5ee53a27f36ce7eec4784efaef345.tar.bz2 pyramid-6326c7ca69a5ee53a27f36ce7eec4784efaef345.zip | |
Update logging and sessions steps in Quick Tour
Diffstat (limited to 'docs/quick_tour/sessions/tests/test_views.py')
| -rw-r--r-- | docs/quick_tour/sessions/tests/test_views.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/quick_tour/sessions/tests/test_views.py b/docs/quick_tour/sessions/tests/test_views.py new file mode 100644 index 000000000..0b019fe82 --- /dev/null +++ b/docs/quick_tour/sessions/tests/test_views.py @@ -0,0 +1,13 @@ +from hello_world.views.default import my_view +from hello_world.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'] == 'hello_world' + +def test_notfound_view(app_request): + info = notfound_view(app_request) + assert app_request.response.status_int == 404 + assert info == {} |
