diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-07-20 14:48:51 +0200 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-07-22 09:29:54 +0200 |
| commit | bdca5ea345c548a82a80d198906818c9ccbef896 (patch) | |
| tree | 5c3f5fe5ad2522175d67b96a1fce1ff1763ba125 /tests/regressiontests/admin_views | |
| parent | 3cb2457f46b3e40ff6b6acffcb3fd44cbea091e5 (diff) | |
[py3] Replaced unicode/str by six.text_type/bytes.
Diffstat (limited to 'tests/regressiontests/admin_views')
| -rw-r--r-- | tests/regressiontests/admin_views/tests.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/regressiontests/admin_views/tests.py b/tests/regressiontests/admin_views/tests.py index 630758a91d..a139016f27 100644 --- a/tests/regressiontests/admin_views/tests.py +++ b/tests/regressiontests/admin_views/tests.py @@ -30,6 +30,7 @@ from django.utils.cache import get_max_age from django.utils.encoding import iri_to_uri from django.utils.html import escape from django.utils.http import urlencode +from django.utils import six from django.test.utils import override_settings # local test models @@ -2478,7 +2479,7 @@ class AdminCustomQuerysetTest(TestCase): response = self.client.post('/test_admin/admin/admin_views/paper/%s/' % p.pk, post_data, follow=True) self.assertEqual(response.status_code, 200) - # Message should contain non-ugly model name. Instance representation is set by unicode() (ugly) + # Message should contain non-ugly model name. Instance representation is set by six.text_type() (ugly) self.assertContains(response, '<li class="info">The paper "Paper_Deferred_author object" was changed successfully.</li>', html=True) # defer() is used in ModelAdmin.queryset() @@ -2530,8 +2531,8 @@ class AdminInlineFileUploadTest(TestCase): "pictures-TOTAL_FORMS": "2", "pictures-INITIAL_FORMS": "1", "pictures-MAX_NUM_FORMS": "0", - "pictures-0-id": unicode(self.picture.id), - "pictures-0-gallery": unicode(self.gallery.id), + "pictures-0-id": six.text_type(self.picture.id), + "pictures-0-gallery": six.text_type(self.gallery.id), "pictures-0-name": "Test Picture", "pictures-0-image": "", "pictures-1-id": "", |
