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