diff options
Diffstat (limited to 'tests/regressiontests/admin_inlines')
| -rw-r--r-- | tests/regressiontests/admin_inlines/models.py | 6 | ||||
| -rw-r--r-- | tests/regressiontests/admin_inlines/tests.py | 10 |
2 files changed, 9 insertions, 7 deletions
diff --git a/tests/regressiontests/admin_inlines/models.py b/tests/regressiontests/admin_inlines/models.py index f2add00288..d7526d6020 100644 --- a/tests/regressiontests/admin_inlines/models.py +++ b/tests/regressiontests/admin_inlines/models.py @@ -2,6 +2,8 @@ Testing of admin inline formsets. """ +from __future__ import unicode_literals + from django.db import models from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic @@ -30,7 +32,7 @@ class Child(models.Model): parent = generic.GenericForeignKey() def __unicode__(self): - return u'I am %s, a child of %s' % (self.name, self.parent) + return 'I am %s, a child of %s' % (self.name, self.parent) class Book(models.Model): @@ -145,4 +147,4 @@ class ProfileCollection(models.Model): class Profile(models.Model): collection = models.ForeignKey(ProfileCollection, blank=True, null=True) first_name = models.CharField(max_length=100) - last_name = models.CharField(max_length=100)
\ No newline at end of file + last_name = models.CharField(max_length=100) diff --git a/tests/regressiontests/admin_inlines/tests.py b/tests/regressiontests/admin_inlines/tests.py index 2cca67012f..94790af56c 100644 --- a/tests/regressiontests/admin_inlines/tests.py +++ b/tests/regressiontests/admin_inlines/tests.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import +from __future__ import absolute_import, unicode_literals from django.contrib.admin.tests import AdminSeleniumWebDriverTestCase from django.contrib.admin.helpers import InlineAdminForm @@ -67,7 +67,7 @@ class TestInline(TestCase): 'shoppingweakness_set-TOTAL_FORMS': 1, 'shoppingweakness_set-INITIAL_FORMS': 0, 'shoppingweakness_set-MAX_NUM_FORMS': 0, - '_save': u'Save', + '_save': 'Save', 'person': person.id, 'max_weight': 0, 'shoppingweakness_set-0-item': item.id, @@ -85,7 +85,7 @@ class TestInline(TestCase): 'title_set-TOTAL_FORMS': 1, 'title_set-INITIAL_FORMS': 0, 'title_set-MAX_NUM_FORMS': 0, - '_save': u'Save', + '_save': 'Save', 'title_set-0-title1': 'a title', 'title_set-0-title2': 'a different title', } @@ -235,8 +235,8 @@ class TestInlinePermissions(TestCase): permission = Permission.objects.get(codename='change_holder2', content_type=self.holder_ct) self.user.user_permissions.add(permission) - author = Author.objects.create(pk=1, name=u'The Author') - book = author.books.create(name=u'The inline Book') + author = Author.objects.create(pk=1, name='The Author') + book = author.books.create(name='The inline Book') self.author_change_url = '/admin/admin_inlines/author/%i/' % author.id # Get the ID of the automatically created intermediate model for thw Author-Book m2m author_book_auto_m2m_intermediate = Author.books.through.objects.get(author=author, book=book) |
