diff --git a/tests/regressiontests/forms/tests.py b/tests/regressiontests/forms/tests.py index 7f9f7fcbef..a093e30ed8 100644 --- a/tests/regressiontests/forms/tests.py +++ b/tests/regressiontests/forms/tests.py @@ -3878,6 +3878,24 @@ A Select widget that uses a list of Japanese prefectures as its choices. +# ITZipCodeField ############################################################# + +>>> from django.contrib.localflavor.it.forms import ITZipCodeField +>>> f = ITZipCodeField() +>>> f.clean('00100') +u'00100' +>>> f.clean(' 00100') +Traceback (most recent call last): +... +ValidationError: [u'Enter a zip code in the format XXXXX.'] + +# ITRegionSelect ############################################################# + +>>> from django.contrib.localflavor.it.forms import ITRegionSelect +>>> w = ITRegionSelect() +>>> w.render('regions', 'PMN') +u'' + # FIZipCodeField ############################################################# FIZipCodeField validates that the data is a valid FI zipcode.