diff -r 5ff1fc726848 -r c6bca38c1cbf parts/django/tests/regressiontests/forms/localflavor/sk.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/parts/django/tests/regressiontests/forms/localflavor/sk.py Sat Jan 08 11:20:57 2011 +0530
@@ -0,0 +1,116 @@
+from django.contrib.localflavor.sk.forms import (SKRegionSelect,
+ SKPostalCodeField, SKDistrictSelect)
+
+from utils import LocalFlavorTestCase
+
+
+class SKLocalFlavorTests(LocalFlavorTestCase):
+ def test_SKRegionSelect(self):
+ f = SKRegionSelect()
+ out = u''''''
+ self.assertEqual(f.render('regions', 'TT'), out)
+
+ def test_SKDistrictSelect(self):
+ f = SKDistrictSelect()
+ out = u''''''
+ self.assertEqual(f.render('Districts', 'RK'), out)
+
+ def test_SKPostalCodeField(self):
+ error_format = [u'Enter a postal code in the format XXXXX or XXX XX.']
+ valid = {
+ '91909': '91909',
+ '917 01': '91701',
+ }
+ invalid = {
+ '84545x': error_format,
+ }
+ self.assertFieldOutput(SKPostalCodeField, valid, invalid)