summaryrefslogtreecommitdiff
path: root/tests/forms_tests/widget_tests/test_selectmultiple.py
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2016-09-21 15:12:13 -0700
committerGitHub <noreply@github.com>2016-09-21 15:12:13 -0700
commit2c716c1dc721e74ef14b2ac25e3510024c79e070 (patch)
treef516f6d20140b8e7386894f5787c1731f6245670 /tests/forms_tests/widget_tests/test_selectmultiple.py
parent42dc9d04006c0bdecba6e0c8a29038b01d5a62d7 (diff)
Fixed #27256 -- Changed Select widget's selected attribute to use HTML5 boolean syntax.
Diffstat (limited to 'tests/forms_tests/widget_tests/test_selectmultiple.py')
-rw-r--r--tests/forms_tests/widget_tests/test_selectmultiple.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/forms_tests/widget_tests/test_selectmultiple.py b/tests/forms_tests/widget_tests/test_selectmultiple.py
index 3430d68113..41dd6a4eb7 100644
--- a/tests/forms_tests/widget_tests/test_selectmultiple.py
+++ b/tests/forms_tests/widget_tests/test_selectmultiple.py
@@ -10,7 +10,7 @@ class SelectMultipleTest(WidgetTest):
def test_render_selected(self):
self.check_html(self.widget(choices=self.beatles), 'beatles', ['J'], html=(
"""<select multiple="multiple" name="beatles">
- <option value="J" selected="selected">John</option>
+ <option value="J" selected>John</option>
<option value="P">Paul</option>
<option value="G">George</option>
<option value="R">Ringo</option>
@@ -20,8 +20,8 @@ class SelectMultipleTest(WidgetTest):
def test_render_multiple_selected(self):
self.check_html(self.widget(choices=self.beatles), 'beatles', ['J', 'P'], html=(
"""<select multiple="multiple" name="beatles">
- <option value="J" selected="selected">John</option>
- <option value="P" selected="selected">Paul</option>
+ <option value="J" selected>John</option>
+ <option value="P" selected>Paul</option>
<option value="G">George</option>
<option value="R">Ringo</option>
</select>"""
@@ -60,11 +60,11 @@ class SelectMultipleTest(WidgetTest):
"""
self.check_html(self.widget(choices=self.numeric_choices), 'choices', ['0'], html=(
"""<select multiple="multiple" name="choices">
- <option value="0" selected="selected">0</option>
+ <option value="0" selected>0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
- <option value="0" selected="selected">extra</option>
+ <option value="0" selected>extra</option>
</select>"""
))
@@ -75,9 +75,9 @@ class SelectMultipleTest(WidgetTest):
"""
self.check_html(self.widget(choices=self.beatles), 'beatles', ['J', 'G', 'foo'], html=(
"""<select multiple="multiple" name="beatles">
- <option value="J" selected="selected">John</option>
+ <option value="J" selected>John</option>
<option value="P">Paul</option>
- <option value="G" selected="selected">George</option>
+ <option value="G" selected>George</option>
<option value="R">Ringo</option>
</select>"""
))
@@ -88,7 +88,7 @@ class SelectMultipleTest(WidgetTest):
self.check_html(self.widget(choices=choices), 'nums', [2], html=(
"""<select multiple="multiple" name="nums">
<option value="1">1</option>
- <option value="2" selected="selected">2</option>
+ <option value="2" selected>2</option>
<option value="3">3</option>
</select>"""
))
@@ -96,7 +96,7 @@ class SelectMultipleTest(WidgetTest):
self.check_html(self.widget(choices=choices), 'nums', ['2'], html=(
"""<select multiple="multiple" name="nums">
<option value="1">1</option>
- <option value="2" selected="selected">2</option>
+ <option value="2" selected>2</option>
<option value="3">3</option>
</select>"""
))
@@ -104,7 +104,7 @@ class SelectMultipleTest(WidgetTest):
self.check_html(self.widget(choices=choices), 'nums', [2], html=(
"""<select multiple="multiple" name="nums">
<option value="1">1</option>
- <option value="2" selected="selected">2</option>
+ <option value="2" selected>2</option>
<option value="3">3</option>
</select>"""
))
@@ -116,10 +116,10 @@ class SelectMultipleTest(WidgetTest):
))
self.check_html(widget, 'nestchoice', ['outer1', 'inner2'], html=(
"""<select multiple="multiple" name="nestchoice">
- <option value="outer1" selected="selected">Outer 1</option>
+ <option value="outer1" selected>Outer 1</option>
<optgroup label="Group &quot;1&quot;">
<option value="inner1">Inner 1</option>
- <option value="inner2" selected="selected">Inner 2</option>
+ <option value="inner2" selected>Inner 2</option>
</optgroup>
</select>"""
))