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