diff --git a/tests/migrations/test_writer.py b/tests/migrations/test_writer.py index 22925fee9b..05757bb238 100644 --- a/tests/migrations/test_writer.py +++ b/tests/migrations/test_writer.py @@ -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))