Ticket #3114: multiple_choice_tests_4194.patch

File multiple_choice_tests_4194.patch, 854 bytes (added by Honza Král <Honza.Kral@…>, 18 years ago)

patch against version 4194

  • tests/regressiontests/forms/tests.py

     
    16651665<li><label><input checked="checked" type="checkbox" name="composers" value="J" /> John Lennon</label></li>
    16661666<li><label><input type="checkbox" name="composers" value="P" /> Paul McCartney</label></li>
    16671667</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)
    16691673>>> print f['composers']
    16701674<ul>
    16711675<li><label><input checked="checked" type="checkbox" name="composers" value="J" /> John Lennon</label></li>
Back to Top