diff options
author | Claude Paroz <claude@2xlibre.net> | 2016-12-29 16:27:49 +0100 |
---|---|---|
committer | Claude Paroz <claude@2xlibre.net> | 2017-01-18 20:18:46 +0100 |
commit | 7b2f2e74adb36a4334e83130f6abc2f79d395235 (patch) | |
tree | 313387ba6a6f1311b43cf5fb4f2576d2d6c4f805 /tests/admin_utils | |
parent | f6acd1d271122d66de8061e75ae26137ddf02658 (diff) | |
download | django-7b2f2e74adb36a4334e83130f6abc2f79d395235.tar.gz |
Refs #23919 -- Removed six.<various>_types usage
Thanks Tim Graham and Simon Charette for the reviews.
Diffstat (limited to 'tests/admin_utils')
-rw-r--r-- | tests/admin_utils/models.py | 3 | ||||
-rw-r--r-- | tests/admin_utils/test_logentry.py | 10 |
2 files changed, 6 insertions, 7 deletions
diff --git a/tests/admin_utils/models.py b/tests/admin_utils/models.py index 1af2f09411..cf90421e9a 100644 --- a/tests/admin_utils/models.py +++ b/tests/admin_utils/models.py @@ -1,5 +1,4 @@ from django.db import models -from django.utils import six from django.utils.translation import ugettext_lazy as _ @@ -37,7 +36,7 @@ class Count(models.Model): parent = models.ForeignKey('self', models.CASCADE, null=True) def __str__(self): - return six.text_type(self.num) + return str(self.num) class Event(models.Model): diff --git a/tests/admin_utils/test_logentry.py b/tests/admin_utils/test_logentry.py index 89b25f462b..c2eee96f48 100644 --- a/tests/admin_utils/test_logentry.py +++ b/tests/admin_utils/test_logentry.py @@ -7,7 +7,7 @@ from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.test import TestCase, override_settings from django.urls import reverse -from django.utils import six, translation +from django.utils import translation from django.utils.encoding import force_bytes from django.utils.html import escape @@ -164,17 +164,17 @@ class LogEntryTests(TestCase): log_entry = LogEntry() log_entry.action_flag = ADDITION - self.assertTrue(six.text_type(log_entry).startswith('Added ')) + self.assertTrue(str(log_entry).startswith('Added ')) log_entry.action_flag = CHANGE - self.assertTrue(six.text_type(log_entry).startswith('Changed ')) + self.assertTrue(str(log_entry).startswith('Changed ')) log_entry.action_flag = DELETION - self.assertTrue(six.text_type(log_entry).startswith('Deleted ')) + self.assertTrue(str(log_entry).startswith('Deleted ')) # Make sure custom action_flags works log_entry.action_flag = 4 - self.assertEqual(six.text_type(log_entry), 'LogEntry Object') + self.assertEqual(str(log_entry), 'LogEntry Object') def test_log_action(self): content_type_pk = ContentType.objects.get_for_model(Article).pk |