Ticket #3114: multiple_choice_tests_4194.patch
File multiple_choice_tests_4194.patch, 854 bytes (added by , 18 years ago) |
---|
-
tests/regressiontests/forms/tests.py
1665 1665 <li><label><input checked="checked" type="checkbox" name="composers" value="J" /> John Lennon</label></li> 1666 1666 <li><label><input type="checkbox" name="composers" value="P" /> Paul McCartney</label></li> 1667 1667 </ul> 1668 >>> f = SongForm({'composers': ['J', 'P']}, auto_id=False) 1668 >>> from django.utils.datastructures import MultiValueDict 1669 >>> d = MultiValueDict() 1670 >>> d.appendlist( 'composers', 'J' ) 1671 >>> d.appendlist( 'composers', 'P' ) 1672 >>> f = SongForm(d, auto_id=False) 1669 1673 >>> print f['composers'] 1670 1674 <ul> 1671 1675 <li><label><input checked="checked" type="checkbox" name="composers" value="J" /> John Lennon</label></li>