Removed usage of u"" string prefix, which doesn't work on python3.2

This commit is contained in:
Alex Gaynor 2013-08-23 04:56:37 -07:00
parent 9aa358cedd
commit 8363406dad
1 changed files with 7 additions and 3 deletions

View File

@ -1,5 +1,9 @@
# encoding: utf8
from __future__ import unicode_literals
import datetime
from django.utils import six
from django.test import TestCase
from django.db.migrations.writer import MigrationWriter
@ -48,8 +52,8 @@ class WriterTests(TestCase):
# Basic values
self.assertSerializedEqual(1)
self.assertSerializedEqual(None)
self.assertSerializedEqual("foobar")
self.assertSerializedEqual(u"föobár")
self.assertSerializedEqual(b"foobar")
self.assertSerializedEqual("föobár")
self.assertSerializedEqual({1: 2})
self.assertSerializedEqual(["a", 2, True, None])
self.assertSerializedEqual(set([2, 3, "eighty"]))
@ -67,7 +71,7 @@ class WriterTests(TestCase):
"""
Tests serializing a simple migration.
"""
migration = type("Migration", (migrations.Migration,), {
migration = type(str("Migration"), (migrations.Migration,), {
"operations": [
migrations.DeleteModel("MyModel"),
migrations.AddField("OtherModel", "field_name", models.DateTimeField(default=datetime.datetime.utcnow))