PageRenderTime 122ms CodeModel.GetById 114ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/tests/regressiontests/forms/localflavor/ie.py

https://code.google.com/p/mango-py/
Python | 43 lines | 40 code | 3 blank | 0 comment | 0 complexity | 3dacb1a047fcc2f90973297b58714ca7 MD5 | raw file
 1from django.contrib.localflavor.ie.forms import IECountySelect
 2
 3from utils import LocalFlavorTestCase
 4
 5
 6class IELocalFlavorTests(LocalFlavorTestCase):
 7    def test_IECountySelect(self):
 8        f = IECountySelect()
 9        out = u'''<select name="counties">
10<option value="antrim">Antrim</option>
11<option value="armagh">Armagh</option>
12<option value="carlow">Carlow</option>
13<option value="cavan">Cavan</option>
14<option value="clare">Clare</option>
15<option value="cork">Cork</option>
16<option value="derry">Derry</option>
17<option value="donegal">Donegal</option>
18<option value="down">Down</option>
19<option value="dublin" selected="selected">Dublin</option>
20<option value="fermanagh">Fermanagh</option>
21<option value="galway">Galway</option>
22<option value="kerry">Kerry</option>
23<option value="kildare">Kildare</option>
24<option value="kilkenny">Kilkenny</option>
25<option value="laois">Laois</option>
26<option value="leitrim">Leitrim</option>
27<option value="limerick">Limerick</option>
28<option value="longford">Longford</option>
29<option value="louth">Louth</option>
30<option value="mayo">Mayo</option>
31<option value="meath">Meath</option>
32<option value="monaghan">Monaghan</option>
33<option value="offaly">Offaly</option>
34<option value="roscommon">Roscommon</option>
35<option value="sligo">Sligo</option>
36<option value="tipperary">Tipperary</option>
37<option value="tyrone">Tyrone</option>
38<option value="waterford">Waterford</option>
39<option value="westmeath">Westmeath</option>
40<option value="wexford">Wexford</option>
41<option value="wicklow">Wicklow</option>
42</select>'''
43        self.assertEqual(f.render('counties', 'dublin'), out)