Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.2.X] Converted Spanish localflavor doctests to unittests. We have …

…always been at war with doctests. Thanks to Idan Gazit. Backport of [14937].

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@14962 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 812b1b2d8ce8b17ece74eadfbeea82d1ad1ad4f3 1 parent cae809b
Alex Gaynor authored December 18, 2010
515  tests/regressiontests/forms/localflavor/es.py
... ...
@@ -1,347 +1,172 @@
1  
-# -*- coding: utf-8 -*-
2  
-# Tests for the contrib/localflavor/ ES form fields.
  1
+from django.contrib.localflavor.es.forms import (ESPostalCodeField, ESPhoneNumberField,
  2
+    ESIdentityCardNumberField, ESCCCField, ESRegionSelect, ESProvinceSelect)
  3
+
  4
+from utils import LocalFlavorTestCase
  5
+
  6
+
  7
+class ESLocalFlavorTests(LocalFlavorTestCase):
  8
+    def test_ESRegionSelect(self):
  9
+        f = ESRegionSelect()
  10
+        out = u'''<select name="regions">
  11
+<option value="AN">Andalusia</option>
  12
+<option value="AR">Aragon</option>
  13
+<option value="O">Principality of Asturias</option>
  14
+<option value="IB">Balearic Islands</option>
  15
+<option value="PV">Basque Country</option>
  16
+<option value="CN">Canary Islands</option>
  17
+<option value="S">Cantabria</option>
  18
+<option value="CM">Castile-La Mancha</option>
  19
+<option value="CL">Castile and Leon</option>
  20
+<option value="CT" selected="selected">Catalonia</option>
  21
+<option value="EX">Extremadura</option>
  22
+<option value="GA">Galicia</option>
  23
+<option value="LO">La Rioja</option>
  24
+<option value="M">Madrid</option>
  25
+<option value="MU">Region of Murcia</option>
  26
+<option value="NA">Foral Community of Navarre</option>
  27
+<option value="VC">Valencian Community</option>
  28
+</select>'''
  29
+        self.assertEqual(f.render('regions', 'CT'), out)
  30
+
  31
+    def test_ESProvinceSelect(self):
  32
+        f = ESProvinceSelect()
  33
+        out = u'''<select name="provinces">
  34
+<option value="01">Arava</option>
  35
+<option value="02">Albacete</option>
  36
+<option value="03">Alacant</option>
  37
+<option value="04">Almeria</option>
  38
+<option value="05">Avila</option>
  39
+<option value="06">Badajoz</option>
  40
+<option value="07">Illes Balears</option>
  41
+<option value="08" selected="selected">Barcelona</option>
  42
+<option value="09">Burgos</option>
  43
+<option value="10">Caceres</option>
  44
+<option value="11">Cadiz</option>
  45
+<option value="12">Castello</option>
  46
+<option value="13">Ciudad Real</option>
  47
+<option value="14">Cordoba</option>
  48
+<option value="15">A Coruna</option>
  49
+<option value="16">Cuenca</option>
  50
+<option value="17">Girona</option>
  51
+<option value="18">Granada</option>
  52
+<option value="19">Guadalajara</option>
  53
+<option value="20">Guipuzkoa</option>
  54
+<option value="21">Huelva</option>
  55
+<option value="22">Huesca</option>
  56
+<option value="23">Jaen</option>
  57
+<option value="24">Leon</option>
  58
+<option value="25">Lleida</option>
  59
+<option value="26">La Rioja</option>
  60
+<option value="27">Lugo</option>
  61
+<option value="28">Madrid</option>
  62
+<option value="29">Malaga</option>
  63
+<option value="30">Murcia</option>
  64
+<option value="31">Navarre</option>
  65
+<option value="32">Ourense</option>
  66
+<option value="33">Asturias</option>
  67
+<option value="34">Palencia</option>
  68
+<option value="35">Las Palmas</option>
  69
+<option value="36">Pontevedra</option>
  70
+<option value="37">Salamanca</option>
  71
+<option value="38">Santa Cruz de Tenerife</option>
  72
+<option value="39">Cantabria</option>
  73
+<option value="40">Segovia</option>
  74
+<option value="41">Seville</option>
  75
+<option value="42">Soria</option>
  76
+<option value="43">Tarragona</option>
  77
+<option value="44">Teruel</option>
  78
+<option value="45">Toledo</option>
  79
+<option value="46">Valencia</option>
  80
+<option value="47">Valladolid</option>
  81
+<option value="48">Bizkaia</option>
  82
+<option value="49">Zamora</option>
  83
+<option value="50">Zaragoza</option>
  84
+<option value="51">Ceuta</option>
  85
+<option value="52">Melilla</option>
  86
+</select>'''
  87
+        self.assertEqual(f.render('provinces', '08'), out)
  88
+
  89
+    def test_ESPostalCodeField(self):
  90
+        error_invalid = [u'Enter a valid postal code in the range and format 01XXX - 52XXX.']
  91
+        valid = {
  92
+            '08028': '08028',
  93
+            '28080': '28080',
  94
+        }
  95
+        invalid = {
  96
+            '53001': error_invalid,
  97
+            '0801': error_invalid,
  98
+            '080001': error_invalid,
  99
+            '00999': error_invalid,
  100
+            '08 01': error_invalid,
  101
+            '08A01': error_invalid,
  102
+        }
  103
+        self.assertFieldOutput(ESPostalCodeField, valid, invalid)
  104
+
  105
+    def test_ESPhoneNumberField(self):
  106
+        error_invalid = [u'Enter a valid phone number in one of the formats 6XXXXXXXX, 8XXXXXXXX or 9XXXXXXXX.']
  107
+        valid = {
  108
+            '650010101': '650010101',
  109
+            '931234567': '931234567',
  110
+            '800123123': '800123123',
  111
+        }
  112
+        invalid = {
  113
+            '555555555': error_invalid,
  114
+            '789789789': error_invalid,
  115
+            '99123123': error_invalid,
  116
+            '9999123123': error_invalid,
  117
+        }
  118
+        self.assertFieldOutput(ESPhoneNumberField, valid, invalid)
  119
+
  120
+    def test_ESIdentityCardNumberField(self):
  121
+        error_invalid = [u'Please enter a valid NIF, NIE, or CIF.']
  122
+        error_checksum_nif = [u'Invalid checksum for NIF.']
  123
+        error_checksum_nie = [u'Invalid checksum for NIE.']
  124
+        error_checksum_cif = [u'Invalid checksum for CIF.']
  125
+        valid = {
  126
+            '78699688J': '78699688J',
  127
+            '78699688-J': '78699688J',
  128
+            '78699688 J': '78699688J',
  129
+            '78699688 j': '78699688J',
  130
+            'X0901797J': 'X0901797J',
  131
+            'X-6124387-Q': 'X6124387Q',
  132
+            'X 0012953 G': 'X0012953G',
  133
+            'x-3287690-r': 'X3287690R',
  134
+            't-03287690r': 'T03287690R',
  135
+            'P2907500I': 'P2907500I',
  136
+            'B38790911': 'B38790911',
  137
+            'B31234560': 'B31234560',
  138
+            'B-3879091A': 'B3879091A',
  139
+            'B 38790911': 'B38790911',
  140
+            'P-3900800-H': 'P3900800H',
  141
+            'P 39008008': 'P39008008',
  142
+            'C-28795565': 'C28795565',
  143
+            'C 2879556E': 'C2879556E',
  144
+        }
  145
+        invalid = {
  146
+            '78699688T': error_checksum_nif,
  147
+            'X-03287690': error_invalid,
  148
+            'X-03287690-T': error_checksum_nie,
  149
+            'B 38790917': error_checksum_cif,
  150
+            'C28795567': error_checksum_cif,
  151
+            'I38790911': error_invalid,
  152
+            '78699688-2': error_invalid,
  153
+        }
  154
+        self.assertFieldOutput(ESIdentityCardNumberField, valid, invalid)
  155
+    
  156
+    def test_ESCCCField(self):
  157
+        error_invalid = [u'Please enter a valid bank account number in format XXXX-XXXX-XX-XXXXXXXXXX.']
  158
+        error_checksum = [u'Invalid checksum for bank account number.']
  159
+        valid = {
  160
+            '20770338793100254321': '20770338793100254321',
  161
+            '2077 0338 79 3100254321': '2077 0338 79 3100254321',
  162
+            '2077-0338-79-3100254321': '2077-0338-79-3100254321',
  163
+        }
  164
+        invalid = {
  165
+            '2077.0338.79.3100254321': error_invalid,
  166
+            '2077-0338-78-3100254321': error_checksum,
  167
+            '2077-0338-89-3100254321': error_checksum,
  168
+            '2077-03-3879-3100254321': error_invalid,
  169
+        }
  170
+        self.assertFieldOutput(ESCCCField, valid, invalid)
3 171
 
4  
-tests = r"""
5  
-# ESPostalCodeField ##############################################################
6  
-
7  
-ESPostalCodeField validates that data is a five-digit spanish postal code.
8  
->>> from django.contrib.localflavor.es.forms import ESPostalCodeField
9  
->>> f = ESPostalCodeField()
10  
->>> f.clean('08028')
11  
-u'08028'
12  
->>> f.clean('28080')
13  
-u'28080'
14  
->>> f.clean('53001')
15  
-Traceback (most recent call last):
16  
-...
17  
-ValidationError: [u'Enter a valid postal code in the range and format 01XXX - 52XXX.']
18  
->>> f.clean('0801')
19  
-Traceback (most recent call last):
20  
-...
21  
-ValidationError: [u'Enter a valid postal code in the range and format 01XXX - 52XXX.']
22  
->>> f.clean('080001')
23  
-Traceback (most recent call last):
24  
-...
25  
-ValidationError: [u'Enter a valid postal code in the range and format 01XXX - 52XXX.']
26  
->>> f.clean('00999')
27  
-Traceback (most recent call last):
28  
-...
29  
-ValidationError: [u'Enter a valid postal code in the range and format 01XXX - 52XXX.']
30  
->>> f.clean('08 01')
31  
-Traceback (most recent call last):
32  
-...
33  
-ValidationError: [u'Enter a valid postal code in the range and format 01XXX - 52XXX.']
34  
->>> f.clean('08A01')
35  
-Traceback (most recent call last):
36  
-...
37  
-ValidationError: [u'Enter a valid postal code in the range and format 01XXX - 52XXX.']
38  
->>> f.clean('')
39  
-Traceback (most recent call last):
40  
-...
41  
-ValidationError: [u'This field is required.']
42  
-
43  
->>> f = ESPostalCodeField(required=False)
44  
->>> f.clean('08028')
45  
-u'08028'
46  
->>> f.clean('28080')
47  
-u'28080'
48  
->>> f.clean('53001')
49  
-Traceback (most recent call last):
50  
-...
51  
-ValidationError: [u'Enter a valid postal code in the range and format 01XXX - 52XXX.']
52  
->>> f.clean('0801')
53  
-Traceback (most recent call last):
54  
-...
55  
-ValidationError: [u'Enter a valid postal code in the range and format 01XXX - 52XXX.']
56  
->>> f.clean('080001')
57  
-Traceback (most recent call last):
58  
-...
59  
-ValidationError: [u'Enter a valid postal code in the range and format 01XXX - 52XXX.']
60  
->>> f.clean('00999')
61  
-Traceback (most recent call last):
62  
-...
63  
-ValidationError: [u'Enter a valid postal code in the range and format 01XXX - 52XXX.']
64  
->>> f.clean('08 01')
65  
-Traceback (most recent call last):
66  
-...
67  
-ValidationError: [u'Enter a valid postal code in the range and format 01XXX - 52XXX.']
68  
->>> f.clean('08A01')
69  
-Traceback (most recent call last):
70  
-...
71  
-ValidationError: [u'Enter a valid postal code in the range and format 01XXX - 52XXX.']
72  
->>> f.clean('')
73  
-u''
74  
-
75  
-# ESPhoneNumberField ##############################################################
76  
-
77  
-ESPhoneNumberField validates that data is a nine-digit spanish phone number.
78  
->>> from django.contrib.localflavor.es.forms import ESPhoneNumberField
79  
->>> f = ESPhoneNumberField()
80  
->>> f.clean('650010101')
81  
-u'650010101'
82  
->>> f.clean('931234567')
83  
-u'931234567'
84  
->>> f.clean('800123123')
85  
-u'800123123'
86  
->>> f.clean('555555555')
87  
-Traceback (most recent call last):
88  
-...
89  
-ValidationError: [u'Enter a valid phone number in one of the formats 6XXXXXXXX, 8XXXXXXXX or 9XXXXXXXX.']
90  
->>> f.clean('789789789')
91  
-Traceback (most recent call last):
92  
-...
93  
-ValidationError: [u'Enter a valid phone number in one of the formats 6XXXXXXXX, 8XXXXXXXX or 9XXXXXXXX.']
94  
->>> f.clean('99123123')
95  
-Traceback (most recent call last):
96  
-...
97  
-ValidationError: [u'Enter a valid phone number in one of the formats 6XXXXXXXX, 8XXXXXXXX or 9XXXXXXXX.']
98  
->>> f.clean('9999123123')
99  
-Traceback (most recent call last):
100  
-...
101  
-ValidationError: [u'Enter a valid phone number in one of the formats 6XXXXXXXX, 8XXXXXXXX or 9XXXXXXXX.']
102  
->>> f.clean('')
103  
-Traceback (most recent call last):
104  
-...
105  
-ValidationError: [u'This field is required.']
106  
-
107  
->>> f = ESPhoneNumberField(required=False)
108  
->>> f.clean('650010101')
109  
-u'650010101'
110  
->>> f.clean('931234567')
111  
-u'931234567'
112  
->>> f.clean('800123123')
113  
-u'800123123'
114  
->>> f.clean('555555555')
115  
-Traceback (most recent call last):
116  
-...
117  
-ValidationError: [u'Enter a valid phone number in one of the formats 6XXXXXXXX, 8XXXXXXXX or 9XXXXXXXX.']
118  
->>> f.clean('789789789')
119  
-Traceback (most recent call last):
120  
-...
121  
-ValidationError: [u'Enter a valid phone number in one of the formats 6XXXXXXXX, 8XXXXXXXX or 9XXXXXXXX.']
122  
->>> f.clean('99123123')
123  
-Traceback (most recent call last):
124  
-...
125  
-ValidationError: [u'Enter a valid phone number in one of the formats 6XXXXXXXX, 8XXXXXXXX or 9XXXXXXXX.']
126  
->>> f.clean('9999123123')
127  
-Traceback (most recent call last):
128  
-...
129  
-ValidationError: [u'Enter a valid phone number in one of the formats 6XXXXXXXX, 8XXXXXXXX or 9XXXXXXXX.']
130  
->>> f.clean('')
131  
-u''
132  
-
133  
-# ESIdentityCardNumberField ##############################################################
134  
-
135  
-ESIdentityCardNumberField validates that data is a identification spanish code for companies or individuals (CIF, NIF or NIE).
136  
->>> from django.contrib.localflavor.es.forms import ESIdentityCardNumberField
137  
->>> f = ESIdentityCardNumberField()
138  
->>> f.clean('78699688J')
139  
-'78699688J'
140  
->>> f.clean('78699688-J')
141  
-'78699688J'
142  
->>> f.clean('78699688 J')
143  
-'78699688J'
144  
->>> f.clean('78699688 j')
145  
-'78699688J'
146  
->>> f.clean('78699688T')
147  
-Traceback (most recent call last):
148  
-...
149  
-ValidationError: [u'Invalid checksum for NIF.']
150  
->>> f.clean('X0901797J')
151  
-'X0901797J'
152  
->>> f.clean('X-6124387-Q')
153  
-'X6124387Q'
154  
->>> f.clean('X 0012953 G')
155  
-'X0012953G'
156  
->>> f.clean('x-3287690-r')
157  
-'X3287690R'
158  
->>> f.clean('t-03287690r')
159  
-'T03287690R'
160  
->>> f.clean('P2907500I')
161  
-'P2907500I'
162  
->>> f.clean('X-03287690')
163  
-Traceback (most recent call last):
164  
-...
165  
-ValidationError: [u'Please enter a valid NIF, NIE, or CIF.']
166  
->>> f.clean('X-03287690-T')
167  
-Traceback (most recent call last):
168  
-...
169  
-ValidationError: [u'Invalid checksum for NIE.']
170  
->>> f.clean('B38790911')
171  
-'B38790911'
172  
->>> f.clean('B31234560')
173  
-'B31234560'
174  
->>> f.clean('B-3879091A')
175  
-'B3879091A'
176  
->>> f.clean('B 38790917')
177  
-Traceback (most recent call last):
178  
-...
179  
-ValidationError: [u'Invalid checksum for CIF.']
180  
->>> f.clean('B 38790911')
181  
-'B38790911'
182  
->>> f.clean('P-3900800-H')
183  
-'P3900800H'
184  
->>> f.clean('P 39008008')
185  
-'P39008008'
186  
->>> f.clean('C-28795565')
187  
-'C28795565'
188  
->>> f.clean('C 2879556E')
189  
-'C2879556E'
190  
->>> f.clean('C28795567')
191  
-Traceback (most recent call last):
192  
-...
193  
-ValidationError: [u'Invalid checksum for CIF.']
194  
->>> f.clean('I38790911')
195  
-Traceback (most recent call last):
196  
-...
197  
-ValidationError: [u'Please enter a valid NIF, NIE, or CIF.']
198  
->>> f.clean('78699688-2')
199  
-Traceback (most recent call last):
200  
-...
201  
-ValidationError: [u'Please enter a valid NIF, NIE, or CIF.']
202  
->>> f.clean('')
203  
-Traceback (most recent call last):
204  
-...
205  
-ValidationError: [u'This field is required.']
206  
-
207  
->>> f = ESIdentityCardNumberField(required=False)
208  
->>> f.clean('78699688J')
209  
-'78699688J'
210  
->>> f.clean('78699688-J')
211  
-'78699688J'
212  
->>> f.clean('78699688 J')
213  
-'78699688J'
214  
->>> f.clean('78699688 j')
215  
-'78699688J'
216  
->>> f.clean('78699688T')
217  
-Traceback (most recent call last):
218  
-...
219  
-ValidationError: [u'Invalid checksum for NIF.']
220  
->>> f.clean('X0901797J')
221  
-'X0901797J'
222  
->>> f.clean('X-6124387-Q')
223  
-'X6124387Q'
224  
->>> f.clean('X 0012953 G')
225  
-'X0012953G'
226  
->>> f.clean('x-3287690-r')
227  
-'X3287690R'
228  
->>> f.clean('t-03287690r')
229  
-'T03287690R'
230  
->>> f.clean('X-03287690')
231  
-Traceback (most recent call last):
232  
-...
233  
-ValidationError: [u'Please enter a valid NIF, NIE, or CIF.']
234  
->>> f.clean('X-03287690-T')
235  
-Traceback (most recent call last):
236  
-...
237  
-ValidationError: [u'Invalid checksum for NIE.']
238  
->>> f.clean('B38790911')
239  
-'B38790911'
240  
->>> f.clean('B-3879091A')
241  
-'B3879091A'
242  
->>> f.clean('B 38790917')
243  
-Traceback (most recent call last):
244  
-...
245  
-ValidationError: [u'Invalid checksum for CIF.']
246  
->>> f.clean('B 38790911')
247  
-'B38790911'
248  
->>> f.clean('P-3900800-H')
249  
-'P3900800H'
250  
->>> f.clean('P 39008008')
251  
-'P39008008'
252  
->>> f.clean('C-28795565')
253  
-'C28795565'
254  
->>> f.clean('C 2879556E')
255  
-'C2879556E'
256  
->>> f.clean('C28795567')
257  
-Traceback (most recent call last):
258  
-...
259  
-ValidationError: [u'Invalid checksum for CIF.']
260  
->>> f.clean('I38790911')
261  
-Traceback (most recent call last):
262  
-...
263  
-ValidationError: [u'Please enter a valid NIF, NIE, or CIF.']
264  
->>> f.clean('78699688-2')
265  
-Traceback (most recent call last):
266  
-...
267  
-ValidationError: [u'Please enter a valid NIF, NIE, or CIF.']
268  
->>> f.clean('')
269  
-u''
270  
-
271  
-# ESCCCField ##############################################################
272  
-
273  
-ESCCCField validates that data is a spanish bank account number (codigo cuenta cliente).
274  
-
275  
->>> from django.contrib.localflavor.es.forms import ESCCCField
276  
->>> f = ESCCCField()
277  
->>> f.clean('20770338793100254321')
278  
-'20770338793100254321'
279  
->>> f.clean('2077 0338 79 3100254321')
280  
-'2077 0338 79 3100254321'
281  
->>> f.clean('2077-0338-79-3100254321')
282  
-'2077-0338-79-3100254321'
283  
->>> f.clean('2077.0338.79.3100254321')
284  
-Traceback (most recent call last):
285  
-...
286  
-ValidationError: [u'Please enter a valid bank account number in format XXXX-XXXX-XX-XXXXXXXXXX.']
287  
->>> f.clean('2077-0338-78-3100254321')
288  
-Traceback (most recent call last):
289  
-...
290  
-ValidationError: [u'Invalid checksum for bank account number.']
291  
->>> f.clean('2077-0338-89-3100254321')
292  
-Traceback (most recent call last):
293  
-...
294  
-ValidationError: [u'Invalid checksum for bank account number.']
295  
->>> f.clean('2077-03-3879-3100254321')
296  
-Traceback (most recent call last):
297  
-...
298  
-ValidationError: [u'Please enter a valid bank account number in format XXXX-XXXX-XX-XXXXXXXXXX.']
299  
->>> f.clean('')
300  
-Traceback (most recent call last):
301  
-...
302  
-ValidationError: [u'This field is required.']
303  
-
304  
->>> f = ESCCCField(required=False)
305  
->>> f.clean('20770338793100254321')
306  
-'20770338793100254321'
307  
->>> f.clean('2077 0338 79 3100254321')
308  
-'2077 0338 79 3100254321'
309  
->>> f.clean('2077-0338-79-3100254321')
310  
-'2077-0338-79-3100254321'
311  
->>> f.clean('2077.0338.79.3100254321')
312  
-Traceback (most recent call last):
313  
-...
314  
-ValidationError: [u'Please enter a valid bank account number in format XXXX-XXXX-XX-XXXXXXXXXX.']
315  
->>> f.clean('2077-0338-78-3100254321')
316  
-Traceback (most recent call last):
317  
-...
318  
-ValidationError: [u'Invalid checksum for bank account number.']
319  
->>> f.clean('2077-0338-89-3100254321')
320  
-Traceback (most recent call last):
321  
-...
322  
-ValidationError: [u'Invalid checksum for bank account number.']
323  
->>> f.clean('2077-03-3879-3100254321')
324  
-Traceback (most recent call last):
325  
-...
326  
-ValidationError: [u'Please enter a valid bank account number in format XXXX-XXXX-XX-XXXXXXXXXX.']
327  
->>> f.clean('')
328  
-u''
329  
-
330  
-# ESRegionSelect ##############################################################
331  
-
332  
-ESRegionSelect is a Select widget that uses a list of Spain regions as its choices.
333  
->>> from django.contrib.localflavor.es.forms import ESRegionSelect
334  
->>> w = ESRegionSelect()
335  
->>> w.render('regions', 'CT')
336  
-u'<select name="regions">\n<option value="AN">Andalusia</option>\n<option value="AR">Aragon</option>\n<option value="O">Principality of Asturias</option>\n<option value="IB">Balearic Islands</option>\n<option value="PV">Basque Country</option>\n<option value="CN">Canary Islands</option>\n<option value="S">Cantabria</option>\n<option value="CM">Castile-La Mancha</option>\n<option value="CL">Castile and Leon</option>\n<option value="CT" selected="selected">Catalonia</option>\n<option value="EX">Extremadura</option>\n<option value="GA">Galicia</option>\n<option value="LO">La Rioja</option>\n<option value="M">Madrid</option>\n<option value="MU">Region of Murcia</option>\n<option value="NA">Foral Community of Navarre</option>\n<option value="VC">Valencian Community</option>\n</select>'
337  
-
338  
-# ESProvincenSelect ##############################################################
339  
-
340  
-ESProvinceSelect is a Select widget that uses a list of Spain provinces as its choices.
341  
->>> from django.contrib.localflavor.es.forms import ESProvinceSelect
342  
->>> w = ESProvinceSelect()
343  
->>> w.render('provinces', '08')
344  
-u'<select name="provinces">\n<option value="01">Arava</option>\n<option value="02">Albacete</option>\n<option value="03">Alacant</option>\n<option value="04">Almeria</option>\n<option value="05">Avila</option>\n<option value="06">Badajoz</option>\n<option value="07">Illes Balears</option>\n<option value="08" selected="selected">Barcelona</option>\n<option value="09">Burgos</option>\n<option value="10">Caceres</option>\n<option value="11">Cadiz</option>\n<option value="12">Castello</option>\n<option value="13">Ciudad Real</option>\n<option value="14">Cordoba</option>\n<option value="15">A Coruna</option>\n<option value="16">Cuenca</option>\n<option value="17">Girona</option>\n<option value="18">Granada</option>\n<option value="19">Guadalajara</option>\n<option value="20">Guipuzkoa</option>\n<option value="21">Huelva</option>\n<option value="22">Huesca</option>\n<option value="23">Jaen</option>\n<option value="24">Leon</option>\n<option value="25">Lleida</option>\n<option value="26">La Rioja</option>\n<option value="27">Lugo</option>\n<option value="28">Madrid</option>\n<option value="29">Malaga</option>\n<option value="30">Murcia</option>\n<option value="31">Navarre</option>\n<option value="32">Ourense</option>\n<option value="33">Asturias</option>\n<option value="34">Palencia</option>\n<option value="35">Las Palmas</option>\n<option value="36">Pontevedra</option>\n<option value="37">Salamanca</option>\n<option value="38">Santa Cruz de Tenerife</option>\n<option value="39">Cantabria</option>\n<option value="40">Segovia</option>\n<option value="41">Seville</option>\n<option value="42">Soria</option>\n<option value="43">Tarragona</option>\n<option value="44">Teruel</option>\n<option value="45">Toledo</option>\n<option value="46">Valencia</option>\n<option value="47">Valladolid</option>\n<option value="48">Bizkaia</option>\n<option value="49">Zamora</option>\n<option value="50">Zaragoza</option>\n<option value="51">Ceuta</option>\n<option value="52">Melilla</option>\n</select>'
345  
-
346  
-"""
347 172
 
4  tests/regressiontests/forms/localflavortests.py
... ...
@@ -1,6 +1,5 @@
1 1
 # -*- coding: utf-8 -*-
2 2
 from localflavor.cz import tests as localflavor_cz_tests
3  
-from localflavor.es import tests as localflavor_es_tests
4 3
 from localflavor.fi import tests as localflavor_fi_tests
5 4
 from localflavor.fr import tests as localflavor_fr_tests
6 5
 from localflavor.generic import tests as localflavor_generic_tests
@@ -22,6 +21,7 @@
22 21
 from localflavor.za import tests as localflavor_za_tests
23 22
 
24 23
 from localflavor.ar import ARLocalFlavorTests
  24
+from localflavor.at import ATLocalFlavorTests
25 25
 from localflavor.au import AULocalFlavorTests
26 26
 from localflavor.at import ATLocalFlavorTests
27 27
 from localflavor.br import BRLocalFlavorTests
@@ -29,11 +29,11 @@
29 29
 from localflavor.ch import CHLocalFlavorTests
30 30
 from localflavor.cl import CLLocalFlavorTests
31 31
 from localflavor.de import DELocalFlavorTests
  32
+from localflavor.es import ESLocalFlavorTests
32 33
 
33 34
 
34 35
 __test__ = {
35 36
     'localflavor_cz_tests': localflavor_cz_tests,
36  
-    'localflavor_es_tests': localflavor_es_tests,
37 37
     'localflavor_fi_tests': localflavor_fi_tests,
38 38
     'localflavor_fr_tests': localflavor_fr_tests,
39 39
     'localflavor_generic_tests': localflavor_generic_tests,
1  tests/regressiontests/forms/tests/__init__.py
@@ -21,4 +21,5 @@
21 21
     CHLocalFlavorTests,
22 22
     CLLocalFlavorTests,
23 23
     DELocalFlavorTests,
  24
+    ESLocalFlavorTests,
24 25
 )

0 notes on commit 812b1b2

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