diff --git a/tests/regressiontests/localflavor/__init__.py b/tests/regressiontests/localflavor/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/tests/regressiontests/localflavor/forms.py b/tests/regressiontests/localflavor/forms.py
deleted file mode 100644
index 2dd1da6..0000000
--- a/tests/regressiontests/localflavor/forms.py
+++ /dev/null
@@ -1,7 +0,0 @@
-from django.forms import ModelForm
-from models import Place
-
-class PlaceForm(ModelForm):
- """docstring for PlaceForm"""
- class Meta:
- model = Place
diff --git a/tests/regressiontests/localflavor/models.py b/tests/regressiontests/localflavor/models.py
deleted file mode 100644
index f74a505..0000000
--- a/tests/regressiontests/localflavor/models.py
+++ /dev/null
@@ -1,8 +0,0 @@
-from django.db import models
-from django.contrib.localflavor.us.models import USStateField
-
-class Place(models.Model):
- state = USStateField(blank=True)
- state_req = USStateField()
- state_default = USStateField(default="CA", blank=True)
- name = models.CharField(max_length=20)
diff --git a/tests/regressiontests/localflavor/tests.py b/tests/regressiontests/localflavor/tests.py
deleted file mode 100644
index 0ea3c52..0000000
--- a/tests/regressiontests/localflavor/tests.py
+++ /dev/null
@@ -1,83 +0,0 @@
-from django.test import TestCase
-from models import Place
-from forms import PlaceForm
-
-class USLocalflavorTests(TestCase):
- def setUp(self):
- self.form = PlaceForm({'state':'GA', 'state_req':'NC', 'name':'impossible'})
-
- def test_get_display_methods(self):
- """Test that the get_*_display() methods are added to the model instances."""
- place = self.form.save()
- self.assertEqual(place.get_state_display(), 'Georgia')
- self.assertEqual(place.get_state_req_display(), 'North Carolina')
-
- def test_required(self):
- """Test that required USStateFields throw appropriate errors."""
- form = PlaceForm({'state':'GA', 'name':'Place in GA'})
- self.assertFalse(form.is_valid())
- self.assertEqual(form.errors['state_req'], [u'This field is required.'])
-
- def test_field_blank_option(self):
- """Test that the empty option is there."""
- state_select_html = """\
-"""
- self.assertEqual(str(self.form['state']), state_select_html)
diff --git a/tests/regressiontests/localflavor_regress/__init__.py b/tests/regressiontests/localflavor_regress/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/regressiontests/localflavor_regress/br/__init__.py b/tests/regressiontests/localflavor_regress/br/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/regressiontests/localflavor_regress/models.py b/tests/regressiontests/localflavor_regress/models.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/regressiontests/localflavor_regress/tests.py b/tests/regressiontests/localflavor_regress/tests.py
new file mode 100644
index 0000000..528a1b1
--- /dev/null
+++ b/tests/regressiontests/localflavor_regress/tests.py
@@ -0,0 +1,21 @@
+import unittest
+from django.test import TestCase
+
+# just import your tests here
+from us.tests import *
+
+
+# Get every subclass of TestCase and add to suite
+# Now script check for every imported class, if is a subclass of TestCase add
+# to testlist, and then suite create a TestSuite with these clases.
+testlist=[]
+for i in locals().values():
+ try:
+ if issubclass(i,TestCase) and i is not TestCase:
+ testlist.append(unittest.TestLoader().loadTestsFromTestCase(i))
+ except TypeError:
+ pass
+
+def suite():
+ return unittest.TestSuite(list(testlist))
+
diff --git a/tests/regressiontests/localflavor_regress/us/__init__.py b/tests/regressiontests/localflavor_regress/us/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/regressiontests/localflavor_regress/us/forms.py b/tests/regressiontests/localflavor_regress/us/forms.py
new file mode 100644
index 0000000..9b77e10
--- /dev/null
+++ b/tests/regressiontests/localflavor_regress/us/forms.py
@@ -0,0 +1,7 @@
+from django.forms import ModelForm
+from models import USPlace
+
+class USPlaceForm(ModelForm):
+ """docstring for PlaceForm"""
+ class Meta:
+ model = USPlace
diff --git a/tests/regressiontests/localflavor_regress/us/models.py b/tests/regressiontests/localflavor_regress/us/models.py
new file mode 100644
index 0000000..f944014
--- /dev/null
+++ b/tests/regressiontests/localflavor_regress/us/models.py
@@ -0,0 +1,13 @@
+from django.db import models
+from django.contrib.localflavor.us.models import USStateField
+
+# When creating models you need to remember to add a app_label as
+# 'localflavor_regress', so your model can be found
+
+class USPlace(models.Model):
+ state = USStateField(blank=True)
+ state_req = USStateField()
+ state_default = USStateField(default="CA", blank=True)
+ name = models.CharField(max_length=20)
+ class Meta:
+ app_label = 'localflavor_regress'
diff --git a/tests/regressiontests/localflavor_regress/us/tests.py b/tests/regressiontests/localflavor_regress/us/tests.py
new file mode 100644
index 0000000..e85f0ad
--- /dev/null
+++ b/tests/regressiontests/localflavor_regress/us/tests.py
@@ -0,0 +1,82 @@
+from django.test import TestCase
+from forms import USPlaceForm
+
+class USLocalflavorTests(TestCase):
+ def setUp(self):
+ self.form = USPlaceForm({'state':'GA', 'state_req':'NC', 'name':'impossible'})
+
+ def test_get_display_methods(self):
+ """Test that the get_*_display() methods are added to the model instances."""
+ place = self.form.save()
+ self.assertEqual(place.get_state_display(), 'Georgia')
+ self.assertEqual(place.get_state_req_display(), 'North Carolina')
+
+ def test_required(self):
+ """Test that required USStateFields throw appropriate errors."""
+ form = USPlaceForm({'state':'GA', 'name':'Place in GA'})
+ self.assertFalse(form.is_valid())
+ self.assertEqual(form.errors['state_req'], [u'This field is required.'])
+
+ def test_field_blank_option(self):
+ """Test that the empty option is there."""
+ state_select_html = """\
+"""
+ self.assertEqual(str(self.form['state']), state_select_html)