Code

Ticket #13729: 13729-with-deprecation-path.diff

File 13729-with-deprecation-path.diff, 19.6 KB (added by claudep, 3 years ago)
Line 
1commit 9bbe112c08a0ad4dd30b1b59a5ff87a3d7ea69dc
2Author: Claude Paroz <claude@2xlibre.net>
3Date:   Sat Apr 30 21:51:09 2011 +0200
4
5    Rename django.contrib.localflavor.uk to django.contrib.localflavor.gb
6
7diff --git a/django/contrib/localflavor/gb/__init__.py b/django/contrib/localflavor/gb/__init__.py
8new file mode 100644
9index 0000000..e69de29
10diff --git a/django/contrib/localflavor/gb/forms.py b/django/contrib/localflavor/gb/forms.py
11new file mode 100644
12index 0000000..0f7d91a
13--- /dev/null
14+++ b/django/contrib/localflavor/gb/forms.py
15@@ -0,0 +1,53 @@
16+"""
17+GB-specific Form helpers
18+"""
19+
20+import re
21+
22+from django.forms.fields import CharField, Select
23+from django.forms import ValidationError
24+from django.utils.translation import ugettext_lazy as _
25+
26+class GBPostcodeField(CharField):
27+    """
28+    A form field that validates its input is a UK postcode.
29+
30+    The regular expression used is sourced from the schema for British Standard
31+    BS7666 address types: http://www.govtalk.gov.uk/gdsc/schemas/bs7666-v2-0.xsd
32+
33+    The value is uppercased and a space added in the correct place, if required.
34+    """
35+    default_error_messages = {
36+        'invalid': _(u'Enter a valid postcode.'),
37+    }
38+    outcode_pattern = '[A-PR-UWYZ]([0-9]{1,2}|([A-HIK-Y][0-9](|[0-9]|[ABEHMNPRVWXY]))|[0-9][A-HJKSTUW])'
39+    incode_pattern = '[0-9][ABD-HJLNP-UW-Z]{2}'
40+    postcode_regex = re.compile(r'^(GIR 0AA|%s %s)$' % (outcode_pattern, incode_pattern))
41+    space_regex = re.compile(r' *(%s)$' % incode_pattern)
42+
43+    def clean(self, value):
44+        value = super(GBPostcodeField, self).clean(value)
45+        if value == u'':
46+            return value
47+        postcode = value.upper().strip()
48+        # Put a single space before the incode (second part).
49+        postcode = self.space_regex.sub(r' \1', postcode)
50+        if not self.postcode_regex.search(postcode):
51+            raise ValidationError(self.error_messages['invalid'])
52+        return postcode
53+
54+class GBCountySelect(Select):
55+    """
56+    A Select widget that uses a list of UK Counties/Regions as its choices.
57+    """
58+    def __init__(self, attrs=None):
59+        from gb_regions import GB_REGION_CHOICES
60+        super(GBCountySelect, self).__init__(attrs, choices=GB_REGION_CHOICES)
61+
62+class GBNationSelect(Select):
63+    """
64+    A Select widget that uses a list of UK Nations as its choices.
65+    """
66+    def __init__(self, attrs=None):
67+        from gb_regions import GB_NATIONS_CHOICES
68+        super(GBNationSelect, self).__init__(attrs, choices=GB_NATIONS_CHOICES)
69diff --git a/django/contrib/localflavor/gb/gb_regions.py b/django/contrib/localflavor/gb/gb_regions.py
70new file mode 100644
71index 0000000..c5f5dd7
72--- /dev/null
73+++ b/django/contrib/localflavor/gb/gb_regions.py
74@@ -0,0 +1,97 @@
75+"""
76+Sources:
77+    English regions: http://www.statistics.gov.uk/geography/downloads/31_10_01_REGION_names_and_codes_12_00.xls
78+    Northern Ireland regions: http://en.wikipedia.org/wiki/List_of_Irish_counties_by_area
79+    Welsh regions: http://en.wikipedia.org/wiki/Preserved_counties_of_Wales
80+    Scottish regions: http://en.wikipedia.org/wiki/Regions_and_districts_of_Scotland
81+"""
82+from django.utils.translation import ugettext_lazy as _
83+
84+ENGLAND_REGION_CHOICES = (
85+    ("Bedfordshire", _("Bedfordshire")),
86+    ("Buckinghamshire", _("Buckinghamshire")),
87+    ("Cambridgeshire", ("Cambridgeshire")),
88+    ("Cheshire", _("Cheshire")),
89+    ("Cornwall and Isles of Scilly", _("Cornwall and Isles of Scilly")),
90+    ("Cumbria", _("Cumbria")),
91+    ("Derbyshire", _("Derbyshire")),
92+    ("Devon", _("Devon")),
93+    ("Dorset", _("Dorset")),
94+    ("Durham", _("Durham")),
95+    ("East Sussex", _("East Sussex")),
96+    ("Essex", _("Essex")),
97+    ("Gloucestershire", _("Gloucestershire")),
98+    ("Greater London", _("Greater London")),
99+    ("Greater Manchester", _("Greater Manchester")),
100+    ("Hampshire", _("Hampshire")),
101+    ("Hertfordshire", _("Hertfordshire")),
102+    ("Kent", _("Kent")),
103+    ("Lancashire", _("Lancashire")),
104+    ("Leicestershire", _("Leicestershire")),
105+    ("Lincolnshire", _("Lincolnshire")),
106+    ("Merseyside", _("Merseyside")),
107+    ("Norfolk", _("Norfolk")),
108+    ("North Yorkshire", _("North Yorkshire")),
109+    ("Northamptonshire", _("Northamptonshire")),
110+    ("Northumberland", _("Northumberland")),
111+    ("Nottinghamshire", _("Nottinghamshire")),
112+    ("Oxfordshire", _("Oxfordshire")),
113+    ("Shropshire", _("Shropshire")),
114+    ("Somerset", _("Somerset")),
115+    ("South Yorkshire", _("South Yorkshire")),
116+    ("Staffordshire", _("Staffordshire")),
117+    ("Suffolk", _("Suffolk")),
118+    ("Surrey", _("Surrey")),
119+    ("Tyne and Wear", _("Tyne and Wear")),
120+    ("Warwickshire", _("Warwickshire")),
121+    ("West Midlands", _("West Midlands")),
122+    ("West Sussex", _("West Sussex")),
123+    ("West Yorkshire", _("West Yorkshire")),
124+    ("Wiltshire", _("Wiltshire")),
125+    ("Worcestershire", _("Worcestershire")),
126+)
127+
128+NORTHERN_IRELAND_REGION_CHOICES = (
129+    ("County Antrim", _("County Antrim")),
130+    ("County Armagh", _("County Armagh")),
131+    ("County Down", _("County Down")),
132+    ("County Fermanagh", _("County Fermanagh")),
133+    ("County Londonderry", _("County Londonderry")),
134+    ("County Tyrone", _("County Tyrone")),
135+)
136+
137+WALES_REGION_CHOICES = (
138+    ("Clwyd", _("Clwyd")),
139+    ("Dyfed", _("Dyfed")),
140+    ("Gwent", _("Gwent")),
141+    ("Gwynedd", _("Gwynedd")),
142+    ("Mid Glamorgan", _("Mid Glamorgan")),
143+    ("Powys", _("Powys")),
144+    ("South Glamorgan", _("South Glamorgan")),
145+    ("West Glamorgan", _("West Glamorgan")),
146+)
147+
148+SCOTTISH_REGION_CHOICES = (
149+    ("Borders", _("Borders")),
150+    ("Central Scotland", _("Central Scotland")),
151+    ("Dumfries and Galloway", _("Dumfries and Galloway")),
152+    ("Fife", _("Fife")),
153+    ("Grampian", _("Grampian")),
154+    ("Highland", _("Highland")),
155+    ("Lothian", _("Lothian")),
156+    ("Orkney Islands", _("Orkney Islands")),
157+    ("Shetland Islands", _("Shetland Islands")),
158+    ("Strathclyde", _("Strathclyde")),
159+    ("Tayside", _("Tayside")),
160+    ("Western Isles", _("Western Isles")),
161+)
162+
163+GB_NATIONS_CHOICES = (
164+    ("England", _("England")),
165+    ("Northern Ireland", _("Northern Ireland")),
166+    ("Scotland", _("Scotland")),
167+    ("Wales", _("Wales")),
168+)
169+
170+GB_REGION_CHOICES = ENGLAND_REGION_CHOICES + NORTHERN_IRELAND_REGION_CHOICES + WALES_REGION_CHOICES + SCOTTISH_REGION_CHOICES
171+
172diff --git a/django/contrib/localflavor/uk/forms.py b/django/contrib/localflavor/uk/forms.py
173index aafe973..c54058c 100644
174--- a/django/contrib/localflavor/uk/forms.py
175+++ b/django/contrib/localflavor/uk/forms.py
176@@ -1,53 +1,11 @@
177-"""
178-UK-specific Form helpers
179-"""
180+from django.contrib.localflavor.gb import forms
181 
182-import re
183+import warnings
184+warnings.warn(
185+    'UK prefix for United Kingdom has been deprecated in favour of the GB code. Please use the new GB-prefixed names.',
186+    PendingDeprecationWarning
187+)
188 
189-from django.forms.fields import CharField, Select
190-from django.forms import ValidationError
191-from django.utils.translation import ugettext_lazy as _
192-
193-class UKPostcodeField(CharField):
194-    """
195-    A form field that validates its input is a UK postcode.
196-
197-    The regular expression used is sourced from the schema for British Standard
198-    BS7666 address types: http://www.govtalk.gov.uk/gdsc/schemas/bs7666-v2-0.xsd
199-
200-    The value is uppercased and a space added in the correct place, if required.
201-    """
202-    default_error_messages = {
203-        'invalid': _(u'Enter a valid postcode.'),
204-    }
205-    outcode_pattern = '[A-PR-UWYZ]([0-9]{1,2}|([A-HIK-Y][0-9](|[0-9]|[ABEHMNPRVWXY]))|[0-9][A-HJKSTUW])'
206-    incode_pattern = '[0-9][ABD-HJLNP-UW-Z]{2}'
207-    postcode_regex = re.compile(r'^(GIR 0AA|%s %s)$' % (outcode_pattern, incode_pattern))
208-    space_regex = re.compile(r' *(%s)$' % incode_pattern)
209-
210-    def clean(self, value):
211-        value = super(UKPostcodeField, self).clean(value)
212-        if value == u'':
213-            return value
214-        postcode = value.upper().strip()
215-        # Put a single space before the incode (second part).
216-        postcode = self.space_regex.sub(r' \1', postcode)
217-        if not self.postcode_regex.search(postcode):
218-            raise ValidationError(self.error_messages['invalid'])
219-        return postcode
220-
221-class UKCountySelect(Select):
222-    """
223-    A Select widget that uses a list of UK Counties/Regions as its choices.
224-    """
225-    def __init__(self, attrs=None):
226-        from uk_regions import UK_REGION_CHOICES
227-        super(UKCountySelect, self).__init__(attrs, choices=UK_REGION_CHOICES)
228-
229-class UKNationSelect(Select):
230-    """
231-    A Select widget that uses a list of UK Nations as its choices.
232-    """
233-    def __init__(self, attrs=None):
234-        from uk_regions import UK_NATIONS_CHOICES
235-        super(UKNationSelect, self).__init__(attrs, choices=UK_NATIONS_CHOICES)
236+UKPostcodeField = forms.GBPostcodeField
237+UKCountySelect = forms.GBCountySelect
238+UKNationSelect = forms.GBNationSelect
239diff --git a/django/contrib/localflavor/uk/uk_regions.py b/django/contrib/localflavor/uk/uk_regions.py
240index dd92f5e..71fabc0 100644
241--- a/django/contrib/localflavor/uk/uk_regions.py
242+++ b/django/contrib/localflavor/uk/uk_regions.py
243@@ -1,97 +1,10 @@
244-"""
245-Sources:
246-    English regions: http://www.statistics.gov.uk/geography/downloads/31_10_01_REGION_names_and_codes_12_00.xls
247-    Northern Ireland regions: http://en.wikipedia.org/wiki/List_of_Irish_counties_by_area
248-    Welsh regions: http://en.wikipedia.org/wiki/Preserved_counties_of_Wales
249-    Scottish regions: http://en.wikipedia.org/wiki/Regions_and_districts_of_Scotland
250-"""
251-from django.utils.translation import ugettext_lazy as _
252+from django.contrib.localflavor.gb.gb_regions import *
253 
254-ENGLAND_REGION_CHOICES = (
255-    ("Bedfordshire", _("Bedfordshire")),
256-    ("Buckinghamshire", _("Buckinghamshire")),
257-    ("Cambridgeshire", ("Cambridgeshire")),
258-    ("Cheshire", _("Cheshire")),
259-    ("Cornwall and Isles of Scilly", _("Cornwall and Isles of Scilly")),
260-    ("Cumbria", _("Cumbria")),
261-    ("Derbyshire", _("Derbyshire")),
262-    ("Devon", _("Devon")),
263-    ("Dorset", _("Dorset")),
264-    ("Durham", _("Durham")),
265-    ("East Sussex", _("East Sussex")),
266-    ("Essex", _("Essex")),
267-    ("Gloucestershire", _("Gloucestershire")),
268-    ("Greater London", _("Greater London")),
269-    ("Greater Manchester", _("Greater Manchester")),
270-    ("Hampshire", _("Hampshire")),
271-    ("Hertfordshire", _("Hertfordshire")),
272-    ("Kent", _("Kent")),
273-    ("Lancashire", _("Lancashire")),
274-    ("Leicestershire", _("Leicestershire")),
275-    ("Lincolnshire", _("Lincolnshire")),
276-    ("Merseyside", _("Merseyside")),
277-    ("Norfolk", _("Norfolk")),
278-    ("North Yorkshire", _("North Yorkshire")),
279-    ("Northamptonshire", _("Northamptonshire")),
280-    ("Northumberland", _("Northumberland")),
281-    ("Nottinghamshire", _("Nottinghamshire")),
282-    ("Oxfordshire", _("Oxfordshire")),
283-    ("Shropshire", _("Shropshire")),
284-    ("Somerset", _("Somerset")),
285-    ("South Yorkshire", _("South Yorkshire")),
286-    ("Staffordshire", _("Staffordshire")),
287-    ("Suffolk", _("Suffolk")),
288-    ("Surrey", _("Surrey")),
289-    ("Tyne and Wear", _("Tyne and Wear")),
290-    ("Warwickshire", _("Warwickshire")),
291-    ("West Midlands", _("West Midlands")),
292-    ("West Sussex", _("West Sussex")),
293-    ("West Yorkshire", _("West Yorkshire")),
294-    ("Wiltshire", _("Wiltshire")),
295-    ("Worcestershire", _("Worcestershire")),
296+import warnings
297+warnings.warn(
298+    'UK prefix for United Kingdom has been deprecated in favour of the GB code. Please use the new GB-prefixed names.',
299+    PendingDeprecationWarning
300 )
301 
302-NORTHERN_IRELAND_REGION_CHOICES = (
303-    ("County Antrim", _("County Antrim")),
304-    ("County Armagh", _("County Armagh")),
305-    ("County Down", _("County Down")),
306-    ("County Fermanagh", _("County Fermanagh")),
307-    ("County Londonderry", _("County Londonderry")),
308-    ("County Tyrone", _("County Tyrone")),
309-)
310-
311-WALES_REGION_CHOICES = (
312-    ("Clwyd", _("Clwyd")),
313-    ("Dyfed", _("Dyfed")),
314-    ("Gwent", _("Gwent")),
315-    ("Gwynedd", _("Gwynedd")),
316-    ("Mid Glamorgan", _("Mid Glamorgan")),
317-    ("Powys", _("Powys")),
318-    ("South Glamorgan", _("South Glamorgan")),
319-    ("West Glamorgan", _("West Glamorgan")),
320-)
321-
322-SCOTTISH_REGION_CHOICES = (
323-    ("Borders", _("Borders")),
324-    ("Central Scotland", _("Central Scotland")),
325-    ("Dumfries and Galloway", _("Dumfries and Galloway")),
326-    ("Fife", _("Fife")),
327-    ("Grampian", _("Grampian")),
328-    ("Highland", _("Highland")),
329-    ("Lothian", _("Lothian")),
330-    ("Orkney Islands", _("Orkney Islands")),
331-    ("Shetland Islands", _("Shetland Islands")),
332-    ("Strathclyde", _("Strathclyde")),
333-    ("Tayside", _("Tayside")),
334-    ("Western Isles", _("Western Isles")),
335-)
336-
337-UK_NATIONS_CHOICES = (
338-    ("England", _("England")),
339-    ("Northern Ireland", _("Northern Ireland")),
340-    ("Scotland", _("Scotland")),
341-    ("Wales", _("Wales")),
342-)
343-
344-UK_REGION_CHOICES = ENGLAND_REGION_CHOICES + NORTHERN_IRELAND_REGION_CHOICES + WALES_REGION_CHOICES + SCOTTISH_REGION_CHOICES
345-
346+UK_NATIONS_CHOICES = GB_NATIONS_CHOICES
347+UK_REGION_CHOICES  = GB_REGION_CHOICES
348diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt
349index a38823f..98b2138 100644
350--- a/docs/internals/deprecation.txt
351+++ b/docs/internals/deprecation.txt
352@@ -175,7 +175,6 @@ their deprecation, as per the :ref:`Django deprecation policy
353           combine paths in templates.
354 
355     * 1.6
356-
357         * The compatibility modules ``django.utils.copycompat`` and
358           ``django.utils.hashcompat`` as well as the functions
359           ``django.utils.itercompat.all`` and ``django.utils.itercompat.any``
360@@ -195,6 +194,11 @@ their deprecation, as per the :ref:`Django deprecation policy
361           is now an alias for :class:`~django.core.cache.backends.memcached.MemcachedCache`.
362           In Django 1.6, the historical alias will be removed.
363 
364+        * The UK-prefixed objects of ``django.contrib.localflavor.uk`` will only
365+          be accessible through their new GB-prefixed names (GB is the correct
366+          ISO 3166 code for United Kingdom). They have been depreacted since the
367+          1.4 release.
368+
369     * 2.0
370         * ``django.views.defaults.shortcut()``. This function has been moved
371           to ``django.contrib.contenttypes.views.shortcut()`` as part of the
372diff --git a/docs/ref/contrib/localflavor.txt b/docs/ref/contrib/localflavor.txt
373index 4935382..f6dab64 100644
374--- a/docs/ref/contrib/localflavor.txt
375+++ b/docs/ref/contrib/localflavor.txt
376@@ -123,7 +123,7 @@ Here's an example of how to use them::
377 .. _Sweden: `Sweden (se)`_
378 .. _Switzerland: `Switzerland (ch)`_
379 .. _Turkey: `Turkey (tr)`_
380-.. _United Kingdom: `United Kingdom (uk)`_
381+.. _United Kingdom: `United Kingdom (gb)`_
382 .. _United States of America: `United States of America (us)`_
383 .. _Uruguay: `Uruguay (uy)`_
384 
385@@ -1054,20 +1054,20 @@ Turkey (``tr``)
386 
387     A ``select`` widget that uses a list of Turkish provinces as its choices.
388 
389-United Kingdom (``uk``)
390+United Kingdom (``gb``)
391 =======================
392 
393-.. class:: uk.forms.UKPostcodeField
394+.. class:: gb.forms.GBPostcodeField
395 
396     A form field that validates input as a UK postcode. The regular
397     expression used is sourced from the schema for British Standard BS7666
398     address types at http://www.cabinetoffice.gov.uk/media/291293/bs7666-v2-0.xml.
399 
400-.. class:: uk.forms.UKCountySelect
401+.. class:: gb.forms.GBCountySelect
402 
403     A ``Select`` widget that uses a list of UK counties/regions as its choices.
404 
405-.. class:: uk.forms.UKNationSelect
406+.. class:: gb.forms.GBNationSelect
407 
408     A ``Select`` widget that uses a list of UK nations as its choices.
409 
410diff --git a/tests/regressiontests/forms/localflavor/gb.py b/tests/regressiontests/forms/localflavor/gb.py
411new file mode 100644
412index 0000000..7f23ba5
413--- /dev/null
414+++ b/tests/regressiontests/forms/localflavor/gb.py
415@@ -0,0 +1,30 @@
416+from django.contrib.localflavor.gb.forms import GBPostcodeField
417+
418+from utils import LocalFlavorTestCase
419+
420+
421+class GBLocalFlavorTests(LocalFlavorTestCase):
422+    def test_GBPostcodeField(self):
423+        error_invalid = [u'Enter a valid postcode.']
424+        valid = {
425+            'BT32 4PX': 'BT32 4PX',
426+            'GIR 0AA': 'GIR 0AA',
427+            'BT324PX': 'BT32 4PX',
428+            ' so11aa ': 'SO1 1AA',
429+            ' so1  1aa ': 'SO1 1AA',
430+            'G2 3wt': 'G2 3WT',
431+            'EC1A 1BB': 'EC1A 1BB',
432+            'Ec1a1BB': 'EC1A 1BB',
433+        }
434+        invalid = {
435+            '1NV 4L1D': error_invalid,
436+            '1NV4L1D': error_invalid,
437+            ' b0gUS': error_invalid,
438+        }
439+        self.assertFieldOutput(GBPostcodeField, valid, invalid)
440+        valid = {}
441+        invalid = {
442+            '1NV 4L1D': [u'Enter a bloody postcode!'],
443+        }
444+        kwargs = {'error_messages': {'invalid': 'Enter a bloody postcode!'}}
445+        self.assertFieldOutput(GBPostcodeField, valid, invalid, field_kwargs=kwargs)
446diff --git a/tests/regressiontests/forms/localflavor/uk.py b/tests/regressiontests/forms/localflavor/uk.py
447deleted file mode 100644
448index 6fd536f..0000000
449--- a/tests/regressiontests/forms/localflavor/uk.py
450+++ /dev/null
451@@ -1,30 +0,0 @@
452-from django.contrib.localflavor.uk.forms import UKPostcodeField
453-
454-from utils import LocalFlavorTestCase
455-
456-
457-class UKLocalFlavorTests(LocalFlavorTestCase):
458-    def test_UKPostcodeField(self):
459-        error_invalid = [u'Enter a valid postcode.']
460-        valid = {
461-            'BT32 4PX': 'BT32 4PX',
462-            'GIR 0AA': 'GIR 0AA',
463-            'BT324PX': 'BT32 4PX',
464-            ' so11aa ': 'SO1 1AA',
465-            ' so1  1aa ': 'SO1 1AA',
466-            'G2 3wt': 'G2 3WT',
467-            'EC1A 1BB': 'EC1A 1BB',
468-            'Ec1a1BB': 'EC1A 1BB',
469-        }
470-        invalid = {
471-            '1NV 4L1D': error_invalid,
472-            '1NV4L1D': error_invalid,
473-            ' b0gUS': error_invalid,
474-        }
475-        self.assertFieldOutput(UKPostcodeField, valid, invalid)
476-        valid = {}
477-        invalid = {
478-            '1NV 4L1D': [u'Enter a bloody postcode!'],
479-        }
480-        kwargs = {'error_messages': {'invalid': 'Enter a bloody postcode!'}}
481-        self.assertFieldOutput(UKPostcodeField, valid, invalid, field_kwargs=kwargs)
482diff --git a/tests/regressiontests/forms/localflavortests.py b/tests/regressiontests/forms/localflavortests.py
483index 73f46a7..fb501ab 100644
484--- a/tests/regressiontests/forms/localflavortests.py
485+++ b/tests/regressiontests/forms/localflavortests.py
486@@ -12,6 +12,7 @@ from localflavor.de import DELocalFlavorTests
487 from localflavor.es import ESLocalFlavorTests
488 from localflavor.fi import FILocalFlavorTests
489 from localflavor.fr import FRLocalFlavorTests
490+from localflavor.gb import GBLocalFlavorTests
491 from localflavor.generic import GenericLocalFlavorTests
492 from localflavor.hr import HRLocalFlavorTests
493 from localflavor.id import IDLocalFlavorTests
494@@ -29,7 +30,6 @@ from localflavor.ru import RULocalFlavorTests
495 from localflavor.se import SELocalFlavorTests
496 from localflavor.sk import SKLocalFlavorTests
497 from localflavor.tr import TRLocalFlavorTests
498-from localflavor.uk import UKLocalFlavorTests
499 from localflavor.us import USLocalFlavorTests
500 from localflavor.uy import UYLocalFlavorTests
501 from localflavor.za import ZALocalFlavorTests
502diff --git a/tests/regressiontests/forms/tests/__init__.py b/tests/regressiontests/forms/tests/__init__.py
503index 2d8f9e9..6366a93 100644
504--- a/tests/regressiontests/forms/tests/__init__.py
505+++ b/tests/regressiontests/forms/tests/__init__.py
506@@ -26,6 +26,7 @@ from regressiontests.forms.localflavortests import (
507     ESLocalFlavorTests,
508     FILocalFlavorTests,
509     FRLocalFlavorTests,
510+    GBLocalFlavorTests,
511     GenericLocalFlavorTests,
512     HRLocalFlavorTests,
513     IDLocalFlavorTests,
514@@ -43,7 +44,6 @@ from regressiontests.forms.localflavortests import (
515     SELocalFlavorTests,
516     SKLocalFlavorTests,
517     TRLocalFlavorTests,
518-    UKLocalFlavorTests,
519     USLocalFlavorTests,
520     UYLocalFlavorTests,
521     ZALocalFlavorTests