Removed usage of u"" string prefix, which doesn't work on python3.2
This commit is contained in:
parent
9aa358cedd
commit
8363406dad
|
@ -1,5 +1,9 @@
|
||||||
# encoding: utf8
|
# encoding: utf8
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
from django.utils import six
|
from django.utils import six
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
from django.db.migrations.writer import MigrationWriter
|
from django.db.migrations.writer import MigrationWriter
|
||||||
|
@ -48,8 +52,8 @@ class WriterTests(TestCase):
|
||||||
# Basic values
|
# Basic values
|
||||||
self.assertSerializedEqual(1)
|
self.assertSerializedEqual(1)
|
||||||
self.assertSerializedEqual(None)
|
self.assertSerializedEqual(None)
|
||||||
self.assertSerializedEqual("foobar")
|
self.assertSerializedEqual(b"foobar")
|
||||||
self.assertSerializedEqual(u"föobár")
|
self.assertSerializedEqual("föobár")
|
||||||
self.assertSerializedEqual({1: 2})
|
self.assertSerializedEqual({1: 2})
|
||||||
self.assertSerializedEqual(["a", 2, True, None])
|
self.assertSerializedEqual(["a", 2, True, None])
|
||||||
self.assertSerializedEqual(set([2, 3, "eighty"]))
|
self.assertSerializedEqual(set([2, 3, "eighty"]))
|
||||||
|
@ -67,7 +71,7 @@ class WriterTests(TestCase):
|
||||||
"""
|
"""
|
||||||
Tests serializing a simple migration.
|
Tests serializing a simple migration.
|
||||||
"""
|
"""
|
||||||
migration = type("Migration", (migrations.Migration,), {
|
migration = type(str("Migration"), (migrations.Migration,), {
|
||||||
"operations": [
|
"operations": [
|
||||||
migrations.DeleteModel("MyModel"),
|
migrations.DeleteModel("MyModel"),
|
||||||
migrations.AddField("OtherModel", "field_name", models.DateTimeField(default=datetime.datetime.utcnow))
|
migrations.AddField("OtherModel", "field_name", models.DateTimeField(default=datetime.datetime.utcnow))
|
||||||
|
|
Loading…
Reference in New Issue