Skip to content

Commit

Permalink
Removed usage of u"" string prefix, which doesn't work on python3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
alex committed Aug 23, 2013
1 parent 9aa358c commit 8363406
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions 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
Expand Down Expand Up @@ -48,8 +52,8 @@ def test_serialize(self):
# 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"]))
Expand All @@ -67,7 +71,7 @@ def test_simple_migration(self):
"""
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))
Expand Down

0 comments on commit 8363406

Please sign in to comment.