fix: add WuttaDictEnum
form schema type
This commit is contained in:
parent
ae9ca8eee3
commit
517928320b
2 changed files with 50 additions and 0 deletions
|
@ -81,6 +81,25 @@ class TestWuttaEnum(WebTestCase):
|
|||
self.assertIsInstance(widget, widgets.SelectWidget)
|
||||
|
||||
|
||||
MOCK_STATUS_ONE = 1
|
||||
MOCK_STATUS_TWO = 2
|
||||
MOCK_STATUS = {
|
||||
MOCK_STATUS_ONE: 'one',
|
||||
MOCK_STATUS_TWO: 'two',
|
||||
}
|
||||
|
||||
class TestWuttaDictEnum(WebTestCase):
|
||||
|
||||
def test_widget_maker(self):
|
||||
typ = mod.WuttaDictEnum(self.request, MOCK_STATUS)
|
||||
widget = typ.widget_maker()
|
||||
self.assertIsInstance(widget, widgets.SelectWidget)
|
||||
self.assertEqual(widget.values, [
|
||||
(1, 'one'),
|
||||
(2, 'two'),
|
||||
])
|
||||
|
||||
|
||||
class TestWuttaMoney(WebTestCase):
|
||||
|
||||
def test_widget_maker(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue