summaryrefslogtreecommitdiff
path: root/tests/forms_tests/widget_tests/test_clearablefileinput.py
diff options
context:
space:
mode:
authorantoliny0919 <antoliny0919@gmail.com>2025-07-28 07:59:26 +0900
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2025-08-19 16:35:56 +0200
commit4187da258fe212d494cb578a0bc2b52c4979ab95 (patch)
tree67f6205a16b1f6785f1ed4e06348d332c36a50f3 /tests/forms_tests/widget_tests/test_clearablefileinput.py
parentad4a9e0f3b1de261409bc083aa49dba705531824 (diff)
Fixed #35892 -- Supported Widget.use_fieldset in admin forms.
Diffstat (limited to 'tests/forms_tests/widget_tests/test_clearablefileinput.py')
-rw-r--r--tests/forms_tests/widget_tests/test_clearablefileinput.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/forms_tests/widget_tests/test_clearablefileinput.py b/tests/forms_tests/widget_tests/test_clearablefileinput.py
index ae54cc4b5d..8d3bff4b45 100644
--- a/tests/forms_tests/widget_tests/test_clearablefileinput.py
+++ b/tests/forms_tests/widget_tests/test_clearablefileinput.py
@@ -246,18 +246,19 @@ class ClearableFileInputTest(WidgetTest):
)
form = TestForm()
- self.assertIs(self.widget.use_fieldset, False)
+ self.assertIs(self.widget.use_fieldset, True)
self.assertHTMLEqual(
- '<div><label for="id_field">Field:</label>'
- '<input id="id_field" name="field" type="file" required></div>'
- '<div><label for="id_with_file">With file:</label>Currently: '
+ '<div><fieldset><legend for="id_field">Field:</legend>'
+ '<input id="id_field" name="field" type="file" required></fieldset></div>'
+ '<div><fieldset><legend for="id_with_file">With file:</legend>Currently: '
'<a href="something">something</a><br>Change:<input type="file" '
- 'name="with_file" id="id_with_file"></div>'
- '<div><label for="id_clearable_file">Clearable file:</label>'
+ 'name="with_file" id="id_with_file"></fieldset></div>'
+ '<div><fieldset><legend for="id_clearable_file">Clearable file:</legend>'
'Currently: <a href="something">something</a><input '
'type="checkbox" name="clearable_file-clear" id="clearable_file-clear_id">'
'<label for="clearable_file-clear_id">Clear</label><br>Change:'
- '<input type="file" name="clearable_file" id="id_clearable_file"></div>',
+ '<input type="file" name="clearable_file" id="id_clearable_file">'
+ "</fieldset></div>",
form.render(),
)