Index: tests/regressiontests/forms/tests/widgets.py
===================================================================
--- tests/regressiontests/forms/tests/widgets.py (révision 16843)
+++ tests/regressiontests/forms/tests/widgets.py (copie de travail)
@@ -256,6 +256,15 @@
""")
+
+ # Only one option can be selected, see #8103:
+ self.assertEqual(w.render('choices', '0', choices=(('0', '0'), ('1', '1'), ('2', '2'), ('3', '3'), ('0', 'extra'))), """""")
# The value is compared to its str():
self.assertEqual(w.render('num', 2, choices=[('1', '1'), ('2', '2'), ('3', '3')]), """""")
+ # Multiple options (with the same value) can be selected, see #8103:
+ self.assertEqual(w.render('choices', ['0'], choices=(('0', '0'), ('1', '1'), ('2', '2'), ('3', '3'), ('0', 'extra'))), """""")
+
# If multiple values are given, but some of them are not valid, the valid ones are selected:
self.assertEqual(w.render('beatles', ['J', 'G', 'foo'], choices=(('J', 'John'), ('P', 'Paul'), ('G', 'George'), ('R', 'Ringo'))), """