diff options
| author | Tim Graham <timograham@gmail.com> | 2017-04-15 13:55:33 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-04-20 10:06:34 -0400 |
| commit | af1f986360dc6bb6e75e960dbc191707541128ac (patch) | |
| tree | 19f6cf7d729cb8a454bb57df9cd9dc277a3bd338 /tests/forms_tests | |
| parent | 43b4a1618ed85151494d68778a1bb6304ce1cb79 (diff) | |
Fixed #28059 -- Restored class attribute in <ul> of widgets that use multiple_input.html.
Regression in b52c73008a9d67e9ddbb841872dc15cdd3d6ee01
Diffstat (limited to 'tests/forms_tests')
| -rw-r--r-- | tests/forms_tests/widget_tests/test_radioselect.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/forms_tests/widget_tests/test_radioselect.py b/tests/forms_tests/widget_tests/test_radioselect.py index 58b2fc408e..8ef3a17da5 100644 --- a/tests/forms_tests/widget_tests/test_radioselect.py +++ b/tests/forms_tests/widget_tests/test_radioselect.py @@ -84,3 +84,18 @@ class RadioSelectTest(WidgetTest): </ul> """ self.check_html(self.widget(choices=self.beatles), 'beatle', 'J', attrs={'id': 'bar'}, html=html) + + def test_class_attrs(self): + """ + The <ul> in the multiple_input.html widget template include the class + attribute. + """ + html = """ + <ul class="bar"> + <li><label><input checked type="radio" class="bar" value="J" name="beatle" /> John</label></li> + <li><label><input type="radio" class="bar" value="P" name="beatle" /> Paul</label></li> + <li><label><input type="radio" class="bar" value="G" name="beatle" /> George</label></li> + <li><label><input type="radio" class="bar" value="R" name="beatle" /> Ringo</label></li> + </ul> + """ + self.check_html(self.widget(choices=self.beatles), 'beatle', 'J', attrs={'class': 'bar'}, html=html) |
