3
0
Fork 0

feat: add sane views for 403 Forbidden and 404 Not Found

This commit is contained in:
Lance Edgar 2024-08-14 22:13:55 -05:00
parent e3942ce65e
commit 058632ebeb
5 changed files with 86 additions and 4 deletions

View file

@ -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