mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
[py3] Replaced unicode/str by six.text_type/bytes.
This commit is contained in:
parent
3cb2457f46
commit
bdca5ea345
96 changed files with 376 additions and 294 deletions
|
@ -4,6 +4,7 @@ from operator import attrgetter
|
|||
|
||||
from django.core.exceptions import FieldError
|
||||
from django.test import TestCase
|
||||
from django.utils import six
|
||||
|
||||
from .models import (Chef, CommonInfo, ItalianRestaurant, ParkingLot, Place,
|
||||
Post, Restaurant, Student, StudentWorker, Supplier, Worker, MixinModel)
|
||||
|
@ -21,8 +22,8 @@ class ModelInheritanceTests(TestCase):
|
|||
|
||||
s = Student.objects.create(name="Pebbles", age=5, school_class="1B")
|
||||
|
||||
self.assertEqual(unicode(w1), "Worker Fred")
|
||||
self.assertEqual(unicode(s), "Student Pebbles")
|
||||
self.assertEqual(six.text_type(w1), "Worker Fred")
|
||||
self.assertEqual(six.text_type(s), "Student Pebbles")
|
||||
|
||||
# The children inherit the Meta class of their parents (if they don't
|
||||
# specify their own).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue