Permalink
Browse files

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

  • Loading branch information...
alex committed Aug 23, 2013
1 parent 9aa358c commit 8363406dadbbda02c163687e89b5971ebba3597b
Showing with 7 additions and 3 deletions.
  1. +7 −3 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 @@ 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"]))
@@ -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))

0 comments on commit 8363406

Please sign in to comment.