aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/tests/genericrelations.py
diff options
context:
space:
mode:
authorTom Christie2013-02-04 20:37:09 +0000
committerTom Christie2013-02-04 20:37:09 +0000
commit8e846bdf52f03d0733ac73e418152800e582b898 (patch)
treecd7034d5573f1e264798a618c88addc4d2f45ce0 /rest_framework/tests/genericrelations.py
parentd9b73e15c87c3a7f11d6bea5ffd6118f86e40051 (diff)
parent97f2b994951605ffdef08159be450d1e77762bf9 (diff)
downloaddjango-rest-framework-8e846bdf52f03d0733ac73e418152800e582b898.tar.bz2
Merge branch 'py3k' into 2.2
Conflicts: rest_framework/relations.py rest_framework/serializers.py rest_framework/tests/relations_hyperlink.py rest_framework/tests/relations_slug.py
Diffstat (limited to 'rest_framework/tests/genericrelations.py')
-rw-r--r--rest_framework/tests/genericrelations.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/rest_framework/tests/genericrelations.py b/rest_framework/tests/genericrelations.py
index 146ad1e4..91a98604 100644
--- a/rest_framework/tests/genericrelations.py
+++ b/rest_framework/tests/genericrelations.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes.generic import GenericRelation, GenericForeignKey
from django.db import models
@@ -63,8 +65,8 @@ class TestGenericRelations(TestCase):
serializer = BookmarkSerializer(self.bookmark)
expected = {
- 'tags': [u'django', u'python'],
- 'url': u'https://www.djangoproject.com/'
+ 'tags': ['django', 'python'],
+ 'url': 'https://www.djangoproject.com/'
}
self.assertEquals(serializer.data, expected)
@@ -84,16 +86,16 @@ class TestGenericRelations(TestCase):
serializer = TagSerializer(Tag.objects.all())
expected = [
{
- 'tag': u'django',
- 'tagged_item': u'Bookmark: https://www.djangoproject.com/'
+ 'tag': 'django',
+ 'tagged_item': 'Bookmark: https://www.djangoproject.com/'
},
{
- 'tag': u'python',
- 'tagged_item': u'Bookmark: https://www.djangoproject.com/'
+ 'tag': 'python',
+ 'tagged_item': 'Bookmark: https://www.djangoproject.com/'
},
{
- 'tag': u'reminder',
- 'tagged_item': u'Note: Remember the milk'
+ 'tag': 'reminder',
+ 'tagged_item': 'Note: Remember the milk'
}
]
self.assertEquals(serializer.data, expected)