1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.

Thanks Vinay Sajip for the support of his django3 branch and
Jannis Leidel for the review.
This commit is contained in:
Claude Paroz
2012-06-07 18:08:47 +02:00
parent 706fd9adc0
commit 4a103086d5
401 changed files with 6647 additions and 6157 deletions

View File

@@ -1,3 +1,5 @@
from __future__ import unicode_literals
from django.contrib.localflavor.it.forms import (ITZipCodeField, ITRegionSelect,
ITSocialSecurityNumberField, ITVatNumberField)
@@ -7,7 +9,7 @@ from django.test import SimpleTestCase
class ITLocalFlavorTests(SimpleTestCase):
def test_ITRegionSelect(self):
f = ITRegionSelect()
out = u'''<select name="regions">
out = '''<select name="regions">
<option value="ABR">Abruzzo</option>
<option value="BAS">Basilicata</option>
<option value="CAL">Calabria</option>
@@ -32,7 +34,7 @@ class ITLocalFlavorTests(SimpleTestCase):
self.assertHTMLEqual(f.render('regions', 'PMN'), out)
def test_ITZipCodeField(self):
error_invalid = [u'Enter a valid zip code.']
error_invalid = ['Enter a valid zip code.']
valid = {
'00100': '00100',
}
@@ -42,7 +44,7 @@ class ITLocalFlavorTests(SimpleTestCase):
self.assertFieldOutput(ITZipCodeField, valid, invalid)
def test_ITSocialSecurityNumberField(self):
error_invalid = [u'Enter a valid Social Security number.']
error_invalid = ['Enter a valid Social Security number.']
valid = {
'LVSGDU99T71H501L': 'LVSGDU99T71H501L',
'LBRRME11A01L736W': 'LBRRME11A01L736W',
@@ -56,7 +58,7 @@ class ITLocalFlavorTests(SimpleTestCase):
self.assertFieldOutput(ITSocialSecurityNumberField, valid, invalid)
def test_ITVatNumberField(self):
error_invalid = [u'Enter a valid VAT number.']
error_invalid = ['Enter a valid VAT number.']
valid = {
'07973780013': '07973780013',
'7973780013': '07973780013',