feat: add sane views for 403 Forbidden and 404 Not Found
This commit is contained in:
parent
e3942ce65e
commit
058632ebeb
5 changed files with 86 additions and 4 deletions
|
@ -12,6 +12,16 @@ class TestCommonView(WebTestCase):
|
|||
def test_includeme(self):
|
||||
self.pyramid_config.include('wuttaweb.views.common')
|
||||
|
||||
def test_forbidden_view(self):
|
||||
view = self.make_view()
|
||||
context = view.forbidden_view()
|
||||
self.assertEqual(context['index_title'], self.app.get_title())
|
||||
|
||||
def test_notfound_view(self):
|
||||
view = self.make_view()
|
||||
context = view.notfound_view()
|
||||
self.assertEqual(context['index_title'], self.app.get_title())
|
||||
|
||||
def test_home(self):
|
||||
self.pyramid_config.add_route('setup', '/setup')
|
||||
model = self.app.model
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue