2012-06-08 00:08:47 +08:00
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
2011-07-29 17:41:14 +08:00
|
|
|
from django.contrib.localflavor.ec.forms import ECProvinceSelect
|
|
|
|
|
2011-08-23 10:32:37 +08:00
|
|
|
from django.test import SimpleTestCase
|
2011-07-29 17:41:14 +08:00
|
|
|
|
2011-08-23 10:32:37 +08:00
|
|
|
class ECLocalFlavorTests(SimpleTestCase):
|
2011-07-29 17:41:14 +08:00
|
|
|
def test_ECProvinceSelect(self):
|
|
|
|
p = ECProvinceSelect()
|
2012-06-08 00:08:47 +08:00
|
|
|
out = """<select name="province">
|
2011-07-29 17:41:14 +08:00
|
|
|
<option value="A">Azuay</option>
|
|
|
|
<option value="B">Bol\xedvar</option>
|
|
|
|
<option value="F">Ca\xf1ar</option>
|
|
|
|
<option value="C">Carchi</option>
|
|
|
|
<option value="H">Chimborazo</option>
|
|
|
|
<option value="X">Cotopaxi</option>
|
|
|
|
<option value="O">El Oro</option>
|
|
|
|
<option value="E">Esmeraldas</option>
|
|
|
|
<option value="W">Gal\xe1pagos</option>
|
|
|
|
<option value="G">Guayas</option>
|
|
|
|
<option value="I">Imbabura</option>
|
|
|
|
<option value="L">Loja</option>
|
|
|
|
<option value="R">Los R\xedos</option>
|
|
|
|
<option value="M">Manab\xed</option>
|
|
|
|
<option value="S">Morona Santiago</option>
|
|
|
|
<option value="N">Napo</option>
|
|
|
|
<option value="D">Orellana</option>
|
|
|
|
<option value="Y">Pastaza</option>
|
|
|
|
<option value="P">Pichincha</option>
|
|
|
|
<option value="SE">Santa Elena</option>
|
|
|
|
<option value="SD">Santo Domingo de los Ts\xe1chilas</option>
|
|
|
|
<option value="U" selected="selected">Sucumb\xedos</option>
|
|
|
|
<option value="T">Tungurahua</option>
|
|
|
|
<option value="Z">Zamora Chinchipe</option>
|
|
|
|
</select>"""
|
2012-02-01 04:36:11 +08:00
|
|
|
self.assertHTMLEqual(p.render('province', 'U'), out)
|