summaryrefslogtreecommitdiff
path: root/tests/forms_tests/widget_tests/test_clearablefileinput.py
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2018-01-20 23:09:10 -0800
committerTim Graham <timograham@gmail.com>2018-01-21 02:09:10 -0500
commitff05de760cc4ef4c7f188e163c722ec3bc1f0cbf (patch)
treeba133d0ecea7521935c98cf1c058df4e6a9ff233 /tests/forms_tests/widget_tests/test_clearablefileinput.py
parent4b0f39d9fb2033a9597e30ac13af162440b82ebc (diff)
Fixed #29038 -- Removed closing slash from HTML void tags.
Diffstat (limited to 'tests/forms_tests/widget_tests/test_clearablefileinput.py')
-rw-r--r--tests/forms_tests/widget_tests/test_clearablefileinput.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/forms_tests/widget_tests/test_clearablefileinput.py b/tests/forms_tests/widget_tests/test_clearablefileinput.py
index f338269d09..2ba376db8a 100644
--- a/tests/forms_tests/widget_tests/test_clearablefileinput.py
+++ b/tests/forms_tests/widget_tests/test_clearablefileinput.py
@@ -26,9 +26,9 @@ class ClearableFileInputTest(WidgetTest):
self.check_html(self.widget, 'myfile', FakeFieldFile(), html=(
"""
Currently: <a href="something">something</a>
- <input type="checkbox" name="myfile-clear" id="myfile-clear_id" />
- <label for="myfile-clear_id">Clear</label><br />
- Change: <input type="file" name="myfile" />
+ <input type="checkbox" name="myfile-clear" id="myfile-clear_id">
+ <label for="myfile-clear_id">Clear</label><br>
+ Change: <input type="file" name="myfile">
"""
))
@@ -47,9 +47,9 @@ class ClearableFileInputTest(WidgetTest):
"""
Currently: <a href="something?chapter=1&amp;sect=2&amp;copy=3&amp;lang=en">
something&lt;div onclick=&quot;alert(&#39;oops&#39;)&quot;&gt;.jpg</a>
- <input type="checkbox" name="my&lt;div&gt;file-clear" id="my&lt;div&gt;file-clear_id" />
- <label for="my&lt;div&gt;file-clear_id">Clear</label><br />
- Change: <input type="file" name="my&lt;div&gt;file" />
+ <input type="checkbox" name="my&lt;div&gt;file-clear" id="my&lt;div&gt;file-clear_id">
+ <label for="my&lt;div&gt;file-clear_id">Clear</label><br>
+ Change: <input type="file" name="my&lt;div&gt;file">
"""
))
@@ -62,8 +62,8 @@ class ClearableFileInputTest(WidgetTest):
widget.is_required = True
self.check_html(widget, 'myfile', FakeFieldFile(), html=(
"""
- Currently: <a href="something">something</a> <br />
- Change: <input type="file" name="myfile" />
+ Currently: <a href="something">something</a> <br>
+ Change: <input type="file" name="myfile">
"""
))
@@ -72,7 +72,7 @@ class ClearableFileInputTest(WidgetTest):
A ClearableFileInput instantiated with no initial value does not render
a clear checkbox.
"""
- self.check_html(self.widget, 'myfile', None, html='<input type="file" name="myfile" />')
+ self.check_html(self.widget, 'myfile', None, html='<input type="file" name="myfile">')
def test_render_as_subwidget(self):
"""A ClearableFileInput as a subwidget of MultiWidget."""
@@ -80,9 +80,9 @@ class ClearableFileInputTest(WidgetTest):
self.check_html(widget, 'myfile', [FakeFieldFile()], html=(
"""
Currently: <a href="something">something</a>
- <input type="checkbox" name="myfile_0-clear" id="myfile_0-clear_id" />
- <label for="myfile_0-clear_id">Clear</label><br />
- Change: <input type="file" name="myfile_0" />
+ <input type="checkbox" name="myfile_0-clear" id="myfile_0-clear_id">
+ <label for="myfile_0-clear_id">Clear</label><br>
+ Change: <input type="file" name="myfile_0">
"""
))
@@ -148,7 +148,7 @@ class ClearableFileInputTest(WidgetTest):
return 'value'
html = self.widget.render('myfile', NoURLFieldFile())
- self.assertHTMLEqual(html, '<input name="myfile" type="file" />')
+ self.assertHTMLEqual(html, '<input name="myfile" type="file">')
def test_use_required_attribute(self):
# False when initial data exists. The file input is left blank by the