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,4 +1,4 @@
from __future__ import absolute_import
from __future__ import absolute_import, unicode_literals
from django.db.models import Q
from django.test import TestCase
@ -28,8 +28,8 @@ class NullFkTests(TestCase):
self.assertQuerysetEqual(
Comment.objects.select_related('post__forum__system_info').all(),
[
(c1.id, u'My first comment', '<Post: First Post>'),
(c2.id, u'My second comment', 'None')
(c1.id, 'My first comment', '<Post: First Post>'),
(c2.id, 'My second comment', 'None')
],
transform = lambda c: (c.id, c.comment_text, repr(c.post))
)
@ -40,8 +40,8 @@ class NullFkTests(TestCase):
self.assertQuerysetEqual(
Comment.objects.select_related('post__forum__system_info__system_details'),
[
(c1.id, u'My first comment', '<Post: First Post>'),
(c2.id, u'My second comment', 'None')
(c1.id, 'My first comment', '<Post: First Post>'),
(c2.id, 'My second comment', 'None')
],
transform = lambda c: (c.id, c.comment_text, repr(c.post))
)