Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

unicode: Improved the test slightly for RadioSelect widgets with unicode

choices.


git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5226 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 9de774aad8bf3c91488c8925c31f71acbc2c3fb4 1 parent e1593cc
Malcolm Tredinnick authored May 14, 2007
6  tests/regressiontests/forms/regressions.py
@@ -30,10 +30,10 @@
30 30
 # >>> deactivate()
31 31
 
32 32
 Unicode decoding problems...
33  
->>> GENDERS = (('0', u'En tied\xe4'), ('1', u'Mies'), ('2', u'Nainen'))
  33
+>>> GENDERS = ((u'\xc5', u'En tied\xe4'), (u'\xf8', u'Mies'), (u'\xdf', u'Nainen'))
34 34
 >>> class SomeForm(Form):
35  
-...     somechoice = ChoiceField(choices=GENDERS, widget=RadioSelect())
  35
+...     somechoice = ChoiceField(choices=GENDERS, widget=RadioSelect(), label=u'\xc5\xf8\xdf')
36 36
 >>> f = SomeForm()
37 37
 >>> f.as_p()
38  
-u'<p><label for="id_somechoice_0">Somechoice:</label> <ul>\n<li><label><input type="radio" id="id_somechoice_0" value="0" name="somechoice" /> En tied\xe4</label></li>\n<li><label><input type="radio" id="id_somechoice_1" value="1" name="somechoice" /> Mies</label></li>\n<li><label><input type="radio" id="id_somechoice_2" value="2" name="somechoice" /> Nainen</label></li>\n</ul></p>'
  38
+u'<p><label for="id_somechoice_0">\xc5\xf8\xdf:</label> <ul>\n<li><label><input type="radio" id="id_somechoice_0" value="\xc5" name="somechoice" /> En tied\xe4</label></li>\n<li><label><input type="radio" id="id_somechoice_1" value="\xf8" name="somechoice" /> Mies</label></li>\n<li><label><input type="radio" id="id_somechoice_2" value="\xdf" name="somechoice" /> Nainen</label></li>\n</ul></p>'
39 39
 """

0 notes on commit 9de774a

Please sign in to comment.
Something went wrong with that request. Please try again.