From ffbc599f77120674cd16e6dcac2f22998c84e407 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Fri, 12 Oct 2012 16:21:40 -0500 Subject: [PATCH] Removed country-specific localflavor tests. They now live in separate django-contrib-XX packages. --- .../localflavor/ar/__init__.py | 0 tests/regressiontests/localflavor/ar/tests.py | 103 ---- .../localflavor/at/__init__.py | 0 tests/regressiontests/localflavor/at/tests.py | 49 -- .../localflavor/au/__init__.py | 0 tests/regressiontests/localflavor/au/forms.py | 11 - .../regressiontests/localflavor/au/models.py | 14 - tests/regressiontests/localflavor/au/tests.py | 108 ---- .../localflavor/be/__init__.py | 0 tests/regressiontests/localflavor/be/tests.py | 81 --- .../localflavor/br/__init__.py | 0 tests/regressiontests/localflavor/br/tests.py | 146 ----- .../localflavor/ca/__init__.py | 0 tests/regressiontests/localflavor/ca/tests.py | 115 ---- .../localflavor/ch/__init__.py | 0 tests/regressiontests/localflavor/ch/tests.py | 76 --- .../localflavor/cl/__init__.py | 0 tests/regressiontests/localflavor/cl/tests.py | 58 -- .../localflavor/cn/__init__.py | 0 tests/regressiontests/localflavor/cn/tests.py | 113 ---- .../localflavor/co/__init__.py | 0 tests/regressiontests/localflavor/co/tests.py | 45 -- .../localflavor/cz/__init__.py | 0 tests/regressiontests/localflavor/cz/tests.py | 80 --- .../localflavor/de/__init__.py | 0 tests/regressiontests/localflavor/de/tests.py | 51 -- .../localflavor/ec/__init__.py | 0 tests/regressiontests/localflavor/ec/tests.py | 36 -- .../localflavor/es/__init__.py | 0 tests/regressiontests/localflavor/es/tests.py | 173 ------ .../localflavor/fi/__init__.py | 0 tests/regressiontests/localflavor/fi/tests.py | 383 ------------ .../localflavor/fr/__init__.py | 0 tests/regressiontests/localflavor/fr/tests.py | 152 ----- .../localflavor/gb/__init__.py | 0 tests/regressiontests/localflavor/gb/tests.py | 32 - .../localflavor/hk/__init__.py | 0 tests/regressiontests/localflavor/hk/forms.py | 11 - tests/regressiontests/localflavor/hk/tests.py | 35 -- .../localflavor/hr/__init__.py | 0 tests/regressiontests/localflavor/hr/tests.py | 192 ------ .../localflavor/id/__init__.py | 0 tests/regressiontests/localflavor/id/tests.py | 195 ------ .../localflavor/ie/__init__.py | 0 tests/regressiontests/localflavor/ie/tests.py | 45 -- .../localflavor/il/__init__.py | 0 tests/regressiontests/localflavor/il/tests.py | 41 -- .../localflavor/in_/__init__.py | 0 .../regressiontests/localflavor/in_/tests.py | 178 ------ .../localflavor/is_/__init__.py | 0 .../regressiontests/localflavor/is_/tests.py | 200 ------- .../localflavor/it/__init__.py | 0 tests/regressiontests/localflavor/it/tests.py | 71 --- .../localflavor/jp/__init__.py | 0 tests/regressiontests/localflavor/jp/tests.py | 75 --- .../localflavor/kw/__init__.py | 0 tests/regressiontests/localflavor/kw/tests.py | 17 - .../localflavor/mk/__init__.py | 0 tests/regressiontests/localflavor/mk/forms.py | 11 - .../regressiontests/localflavor/mk/models.py | 15 - tests/regressiontests/localflavor/mk/tests.py | 308 ---------- .../localflavor/mx/__init__.py | 0 tests/regressiontests/localflavor/mx/forms.py | 11 - .../regressiontests/localflavor/mx/models.py | 13 - tests/regressiontests/localflavor/mx/mx.py | 0 tests/regressiontests/localflavor/mx/tests.py | 198 ------- .../localflavor/nl/__init__.py | 0 tests/regressiontests/localflavor/nl/tests.py | 64 -- .../localflavor/pl/__init__.py | 0 tests/regressiontests/localflavor/pl/tests.py | 480 --------------- .../localflavor/pt/__init__.py | 0 tests/regressiontests/localflavor/pt/tests.py | 33 -- .../localflavor/py/__init__.py | 0 tests/regressiontests/localflavor/py/tests.py | 55 -- .../localflavor/ro/__init__.py | 0 tests/regressiontests/localflavor/ro/tests.py | 144 ----- .../localflavor/ru/__init__.py | 0 tests/regressiontests/localflavor/ru/tests.py | 150 ----- .../localflavor/se/__init__.py | 0 tests/regressiontests/localflavor/se/tests.py | 166 ------ .../localflavor/si/__init__.py | 0 tests/regressiontests/localflavor/si/tests.py | 557 ------------------ .../localflavor/sk/__init__.py | 0 tests/regressiontests/localflavor/sk/tests.py | 118 ---- tests/regressiontests/localflavor/tests.py | 42 -- .../localflavor/tr/__init__.py | 0 tests/regressiontests/localflavor/tr/tests.py | 75 --- .../localflavor/us/__init__.py | 0 tests/regressiontests/localflavor/us/forms.py | 11 - .../regressiontests/localflavor/us/models.py | 15 - tests/regressiontests/localflavor/us/tests.py | 286 --------- .../localflavor/uy/__init__.py | 0 tests/regressiontests/localflavor/uy/tests.py | 53 -- .../localflavor/za/__init__.py | 0 tests/regressiontests/localflavor/za/tests.py | 31 - 95 files changed, 5722 deletions(-) delete mode 100644 tests/regressiontests/localflavor/ar/__init__.py delete mode 100644 tests/regressiontests/localflavor/ar/tests.py delete mode 100644 tests/regressiontests/localflavor/at/__init__.py delete mode 100644 tests/regressiontests/localflavor/at/tests.py delete mode 100644 tests/regressiontests/localflavor/au/__init__.py delete mode 100644 tests/regressiontests/localflavor/au/forms.py delete mode 100644 tests/regressiontests/localflavor/au/models.py delete mode 100644 tests/regressiontests/localflavor/au/tests.py delete mode 100644 tests/regressiontests/localflavor/be/__init__.py delete mode 100644 tests/regressiontests/localflavor/be/tests.py delete mode 100644 tests/regressiontests/localflavor/br/__init__.py delete mode 100644 tests/regressiontests/localflavor/br/tests.py delete mode 100644 tests/regressiontests/localflavor/ca/__init__.py delete mode 100644 tests/regressiontests/localflavor/ca/tests.py delete mode 100644 tests/regressiontests/localflavor/ch/__init__.py delete mode 100644 tests/regressiontests/localflavor/ch/tests.py delete mode 100644 tests/regressiontests/localflavor/cl/__init__.py delete mode 100644 tests/regressiontests/localflavor/cl/tests.py delete mode 100644 tests/regressiontests/localflavor/cn/__init__.py delete mode 100644 tests/regressiontests/localflavor/cn/tests.py delete mode 100644 tests/regressiontests/localflavor/co/__init__.py delete mode 100644 tests/regressiontests/localflavor/co/tests.py delete mode 100644 tests/regressiontests/localflavor/cz/__init__.py delete mode 100644 tests/regressiontests/localflavor/cz/tests.py delete mode 100644 tests/regressiontests/localflavor/de/__init__.py delete mode 100644 tests/regressiontests/localflavor/de/tests.py delete mode 100644 tests/regressiontests/localflavor/ec/__init__.py delete mode 100644 tests/regressiontests/localflavor/ec/tests.py delete mode 100644 tests/regressiontests/localflavor/es/__init__.py delete mode 100644 tests/regressiontests/localflavor/es/tests.py delete mode 100644 tests/regressiontests/localflavor/fi/__init__.py delete mode 100644 tests/regressiontests/localflavor/fi/tests.py delete mode 100644 tests/regressiontests/localflavor/fr/__init__.py delete mode 100644 tests/regressiontests/localflavor/fr/tests.py delete mode 100644 tests/regressiontests/localflavor/gb/__init__.py delete mode 100644 tests/regressiontests/localflavor/gb/tests.py delete mode 100644 tests/regressiontests/localflavor/hk/__init__.py delete mode 100644 tests/regressiontests/localflavor/hk/forms.py delete mode 100644 tests/regressiontests/localflavor/hk/tests.py delete mode 100644 tests/regressiontests/localflavor/hr/__init__.py delete mode 100644 tests/regressiontests/localflavor/hr/tests.py delete mode 100644 tests/regressiontests/localflavor/id/__init__.py delete mode 100644 tests/regressiontests/localflavor/id/tests.py delete mode 100644 tests/regressiontests/localflavor/ie/__init__.py delete mode 100644 tests/regressiontests/localflavor/ie/tests.py delete mode 100644 tests/regressiontests/localflavor/il/__init__.py delete mode 100644 tests/regressiontests/localflavor/il/tests.py delete mode 100644 tests/regressiontests/localflavor/in_/__init__.py delete mode 100644 tests/regressiontests/localflavor/in_/tests.py delete mode 100644 tests/regressiontests/localflavor/is_/__init__.py delete mode 100644 tests/regressiontests/localflavor/is_/tests.py delete mode 100644 tests/regressiontests/localflavor/it/__init__.py delete mode 100644 tests/regressiontests/localflavor/it/tests.py delete mode 100644 tests/regressiontests/localflavor/jp/__init__.py delete mode 100644 tests/regressiontests/localflavor/jp/tests.py delete mode 100644 tests/regressiontests/localflavor/kw/__init__.py delete mode 100644 tests/regressiontests/localflavor/kw/tests.py delete mode 100644 tests/regressiontests/localflavor/mk/__init__.py delete mode 100644 tests/regressiontests/localflavor/mk/forms.py delete mode 100644 tests/regressiontests/localflavor/mk/models.py delete mode 100644 tests/regressiontests/localflavor/mk/tests.py delete mode 100644 tests/regressiontests/localflavor/mx/__init__.py delete mode 100644 tests/regressiontests/localflavor/mx/forms.py delete mode 100644 tests/regressiontests/localflavor/mx/models.py delete mode 100644 tests/regressiontests/localflavor/mx/mx.py delete mode 100644 tests/regressiontests/localflavor/mx/tests.py delete mode 100644 tests/regressiontests/localflavor/nl/__init__.py delete mode 100644 tests/regressiontests/localflavor/nl/tests.py delete mode 100644 tests/regressiontests/localflavor/pl/__init__.py delete mode 100644 tests/regressiontests/localflavor/pl/tests.py delete mode 100644 tests/regressiontests/localflavor/pt/__init__.py delete mode 100644 tests/regressiontests/localflavor/pt/tests.py delete mode 100644 tests/regressiontests/localflavor/py/__init__.py delete mode 100644 tests/regressiontests/localflavor/py/tests.py delete mode 100644 tests/regressiontests/localflavor/ro/__init__.py delete mode 100644 tests/regressiontests/localflavor/ro/tests.py delete mode 100644 tests/regressiontests/localflavor/ru/__init__.py delete mode 100644 tests/regressiontests/localflavor/ru/tests.py delete mode 100644 tests/regressiontests/localflavor/se/__init__.py delete mode 100644 tests/regressiontests/localflavor/se/tests.py delete mode 100644 tests/regressiontests/localflavor/si/__init__.py delete mode 100644 tests/regressiontests/localflavor/si/tests.py delete mode 100644 tests/regressiontests/localflavor/sk/__init__.py delete mode 100644 tests/regressiontests/localflavor/sk/tests.py delete mode 100644 tests/regressiontests/localflavor/tr/__init__.py delete mode 100644 tests/regressiontests/localflavor/tr/tests.py delete mode 100644 tests/regressiontests/localflavor/us/__init__.py delete mode 100644 tests/regressiontests/localflavor/us/forms.py delete mode 100644 tests/regressiontests/localflavor/us/models.py delete mode 100644 tests/regressiontests/localflavor/us/tests.py delete mode 100644 tests/regressiontests/localflavor/uy/__init__.py delete mode 100644 tests/regressiontests/localflavor/uy/tests.py delete mode 100644 tests/regressiontests/localflavor/za/__init__.py delete mode 100644 tests/regressiontests/localflavor/za/tests.py diff --git a/tests/regressiontests/localflavor/ar/__init__.py b/tests/regressiontests/localflavor/ar/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/regressiontests/localflavor/ar/tests.py b/tests/regressiontests/localflavor/ar/tests.py deleted file mode 100644 index 0bc228eae9..0000000000 --- a/tests/regressiontests/localflavor/ar/tests.py +++ /dev/null @@ -1,103 +0,0 @@ -from __future__ import unicode_literals - -from django.contrib.localflavor.ar.forms import (ARProvinceSelect, - ARPostalCodeField, ARDNIField, ARCUITField) - -from django.test import SimpleTestCase - - -class ARLocalFlavorTests(SimpleTestCase): - def test_ARProvinceSelect(self): - f = ARProvinceSelect() - out = '''''' - self.assertHTMLEqual(f.render('provincias', 'A'), out) - - def test_ARPostalCodeField(self): - error_format = ['Enter a postal code in the format NNNN or ANNNNAAA.'] - error_atmost = ['Ensure this value has at most 8 characters (it has 9).'] - error_atleast = ['Ensure this value has at least 4 characters (it has 3).'] - valid = { - '5000': '5000', - 'C1064AAB': 'C1064AAB', - 'c1064AAB': 'C1064AAB', - 'C1064aab': 'C1064AAB', - '4400': '4400', - 'C1064AAB': 'C1064AAB', - } - invalid = { - 'C1064AABB': error_atmost + error_format, - 'C1064AA': error_format, - 'C1064AB': error_format, - '106AAB': error_format, - '500': error_atleast + error_format, - '5PPP': error_format, - } - self.assertFieldOutput(ARPostalCodeField, valid, invalid) - - def test_ARDNIField(self): - error_length = ['This field requires 7 or 8 digits.'] - error_digitsonly = ['This field requires only numbers.'] - valid = { - '20123456': '20123456', - '20.123.456': '20123456', - '20123456': '20123456', - '20.123.456': '20123456', - '20.123456': '20123456', - '9123456': '9123456', - '9.123.456': '9123456', - } - invalid = { - '101234566': error_length, - 'W0123456': error_digitsonly, - '10,123,456': error_digitsonly, - } - self.assertFieldOutput(ARDNIField, valid, invalid) - - def test_ARCUITField(self): - error_format = ['Enter a valid CUIT in XX-XXXXXXXX-X or XXXXXXXXXXXX format.'] - error_invalid = ['Invalid CUIT.'] - error_legal_type = ['Invalid legal type. Type must be 27, 20, 23 or 30.'] - valid = { - '20-10123456-9': '20-10123456-9', - '20-10123456-9': '20-10123456-9', - '27-10345678-4': '27-10345678-4', - '20101234569': '20-10123456-9', - '27103456784': '27-10345678-4', - '30011111110': '30-01111111-0', - } - invalid = { - '2-10123456-9': error_format, - '210123456-9': error_format, - '20-10123456': error_format, - '20-10123456-': error_format, - '20-10123456-5': error_invalid, - '27-10345678-1': error_invalid, - '27-10345678-1': error_invalid, - '11211111110': error_legal_type, - } - self.assertFieldOutput(ARCUITField, valid, invalid) diff --git a/tests/regressiontests/localflavor/at/__init__.py b/tests/regressiontests/localflavor/at/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/regressiontests/localflavor/at/tests.py b/tests/regressiontests/localflavor/at/tests.py deleted file mode 100644 index 9123ba4e88..0000000000 --- a/tests/regressiontests/localflavor/at/tests.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import unicode_literals - -from django.contrib.localflavor.at.forms import (ATZipCodeField, ATStateSelect, - ATSocialSecurityNumberField) - -from django.test import SimpleTestCase - - -class ATLocalFlavorTests(SimpleTestCase): - def test_ATStateSelect(self): - f = ATStateSelect() - out = '''''' - self.assertHTMLEqual(f.render('bundesland', 'WI'), out) - - def test_ATZipCodeField(self): - error_format = ['Enter a zip code in the format XXXX.'] - valid = { - '1150': '1150', - '4020': '4020', - '8020': '8020', - } - invalid = { - '0000' : error_format, - '0123' : error_format, - '111222': error_format, - 'eeffee': error_format, - } - self.assertFieldOutput(ATZipCodeField, valid, invalid) - - def test_ATSocialSecurityNumberField(self): - error_format = ['Enter a valid Austrian Social Security Number in XXXX XXXXXX format.'] - valid = { - '1237 010180': '1237 010180', - } - invalid = { - '1237 010181': error_format, - '12370 010180': error_format, - } - self.assertFieldOutput(ATSocialSecurityNumberField, valid, invalid) diff --git a/tests/regressiontests/localflavor/au/__init__.py b/tests/regressiontests/localflavor/au/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/regressiontests/localflavor/au/forms.py b/tests/regressiontests/localflavor/au/forms.py deleted file mode 100644 index aec00694fe..0000000000 --- a/tests/regressiontests/localflavor/au/forms.py +++ /dev/null @@ -1,11 +0,0 @@ -from __future__ import absolute_import - -from django.forms import ModelForm - -from .models import AustralianPlace - - -class AustralianPlaceForm(ModelForm): - """ Form for storing an Australian place. """ - class Meta: - model = AustralianPlace diff --git a/tests/regressiontests/localflavor/au/models.py b/tests/regressiontests/localflavor/au/models.py deleted file mode 100644 index 39061c5bb3..0000000000 --- a/tests/regressiontests/localflavor/au/models.py +++ /dev/null @@ -1,14 +0,0 @@ -from django.contrib.localflavor.au.models import AUStateField, AUPostCodeField -from django.db import models - -class AustralianPlace(models.Model): - state = AUStateField(blank=True) - state_required = AUStateField() - state_default = AUStateField(default="NSW", blank=True) - postcode = AUPostCodeField(blank=True) - postcode_required = AUPostCodeField() - postcode_default = AUPostCodeField(default="2500", blank=True) - name = models.CharField(max_length=20) - - class Meta: - app_label = 'localflavor' diff --git a/tests/regressiontests/localflavor/au/tests.py b/tests/regressiontests/localflavor/au/tests.py deleted file mode 100644 index 69472f0935..0000000000 --- a/tests/regressiontests/localflavor/au/tests.py +++ /dev/null @@ -1,108 +0,0 @@ -from __future__ import absolute_import, unicode_literals - -import re - -from django.test import SimpleTestCase -from django.contrib.localflavor.au.forms import (AUPostCodeField, - AUPhoneNumberField, AUStateSelect) - -from .forms import AustralianPlaceForm - - -SELECTED_OPTION_PATTERN = r'