[py3] Replaced unicode/str by six.text_type/bytes.

This commit is contained in:
Aymeric Augustin 2012-07-20 14:48:51 +02:00
parent 3cb2457f46
commit bdca5ea345
96 changed files with 376 additions and 294 deletions

View file

@ -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).