3
0
Fork 0

fix: add make_form() and make_grid() methods on web handler

to allow override
This commit is contained in:
Lance Edgar 2024-12-11 22:06:33 -06:00
parent 74e2a4f0e2
commit 448dc9fc79
3 changed files with 38 additions and 4 deletions

View file

@ -1,6 +1,8 @@
# -*- coding: utf-8; -*-
from wuttaweb import handler as mod, static
from wuttaweb.forms import Form
from wuttaweb.grids import Grid
from wuttaweb.menus import MenuHandler
from tests.util import WebTestCase
@ -62,3 +64,13 @@ class TestWebHandler(WebTestCase):
handler = self.make_handler()
menus = handler.get_menu_handler()
self.assertIsInstance(menus, MenuHandler)
def test_make_form(self):
handler = self.make_handler()
form = handler.make_form(self.request)
self.assertIsInstance(form, Form)
def test_make_grid(self):
handler = self.make_handler()
grid = handler.make_grid(self.request)
self.assertIsInstance(grid, Grid)