2010-12-18 20:32:08 +00:00
|
|
|
from django.contrib.localflavor.kw.forms import KWCivilIDNumberField
|
|
|
|
|
2011-08-23 02:32:37 +00:00
|
|
|
from django.test import SimpleTestCase
|
2010-12-18 20:32:08 +00:00
|
|
|
|
|
|
|
|
2011-08-23 02:32:37 +00:00
|
|
|
class KWLocalFlavorTests(SimpleTestCase):
|
2010-12-18 20:32:08 +00:00
|
|
|
def test_KWCivilIDNumberField(self):
|
|
|
|
error_invalid = [u'Enter a valid Kuwaiti Civil ID number']
|
|
|
|
valid = {
|
|
|
|
'282040701483': '282040701483',
|
|
|
|
}
|
|
|
|
invalid = {
|
|
|
|
'289332013455': error_invalid,
|
|
|
|
}
|
|
|
|
self.assertFieldOutput(KWCivilIDNumberField, valid, invalid)
|