mirror of
https://github.com/django/django.git
synced 2025-10-26 07:06:08 +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:
@@ -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))
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user