|
1 from django.contrib.localflavor.ie.forms import IECountySelect |
|
2 |
|
3 from utils import LocalFlavorTestCase |
|
4 |
|
5 |
|
6 class 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) |