diff options
Diffstat (limited to 'tests/forms_tests/widget_tests/test_select.py')
| -rw-r--r-- | tests/forms_tests/widget_tests/test_select.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/forms_tests/widget_tests/test_select.py b/tests/forms_tests/widget_tests/test_select.py index a5201e96e8..beba21fe2d 100644 --- a/tests/forms_tests/widget_tests/test_select.py +++ b/tests/forms_tests/widget_tests/test_select.py @@ -348,6 +348,12 @@ class SelectTest(WidgetTest): ) self.assertEqual(index, 2) + def test_optgroups_integer_choices(self): + """The option 'value' is the same type as what's in `choices`.""" + groups = list(self.widget(choices=[[0, 'choice text']]).optgroups('name', ['vhs'])) + label, options, index = groups[0] + self.assertEqual(options[0]['value'], 0) + def test_deepcopy(self): """ __deepcopy__() should copy all attributes properly (#25085). |
