3
0
Fork 0

feat: add support for admin user to become / stop being root

This commit is contained in:
Lance Edgar 2024-08-05 14:21:54 -05:00
parent a2ba88ca8f
commit fc339ba81b
9 changed files with 335 additions and 22 deletions

View file

@ -3,7 +3,7 @@
from unittest import TestCase
from pyramid import testing
from pyramid.httpexceptions import HTTPFound
from pyramid.httpexceptions import HTTPFound, HTTPForbidden
from wuttjamaican.conf import WuttaConfig
from wuttaweb.views import base
@ -23,6 +23,10 @@ class TestView(TestCase):
self.assertIs(self.view.config, self.config)
self.assertIs(self.view.app, self.app)
def test_forbidden(self):
error = self.view.forbidden()
self.assertIsInstance(error, HTTPForbidden)
def test_make_form(self):
form = self.view.make_form()
self.assertIsInstance(form, Form)