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.de.forms import (DEZipCodeField, DEStateSelect,
DEIdentityCardNumberField)
@@ -7,7 +9,7 @@ from django.test import SimpleTestCase
class DELocalFlavorTests(SimpleTestCase):
def test_DEStateSelect(self):
f = DEStateSelect()
out = u'''<select name="states">
out = '''<select name="states">
<option value="BW">Baden-Wuerttemberg</option>
<option value="BY">Bavaria</option>
<option value="BE">Berlin</option>
@@ -28,7 +30,7 @@ class DELocalFlavorTests(SimpleTestCase):
self.assertHTMLEqual(f.render('states', 'TH'), out)
def test_DEZipCodeField(self):
error_format = [u'Enter a zip code in the format XXXXX.']
error_format = ['Enter a zip code in the format XXXXX.']
valid = {
'99423': '99423',
}
@@ -38,7 +40,7 @@ class DELocalFlavorTests(SimpleTestCase):
self.assertFieldOutput(DEZipCodeField, valid, invalid)
def test_DEIdentityCardNumberField(self):
error_format = [u'Enter a valid German identity card number in XXXXXXXXXXX-XXXXXXX-XXXXXXX-X format.']
error_format = ['Enter a valid German identity card number in XXXXXXXXXXX-XXXXXXX-XXXXXXX-X format.']
valid = {
'7549313035D-6004103-0903042-0': '7549313035D-6004103-0903042-0',
'9786324830D 6104243 0910271 2': '9786324830D-6104243-0910271-2',