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/model_regress | |
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/model_regress')
-rw-r--r-- | tests/model_regress/tests.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/model_regress/tests.py b/tests/model_regress/tests.py index 808729979f..e9374d9d93 100644 --- a/tests/model_regress/tests.py +++ b/tests/model_regress/tests.py @@ -5,7 +5,6 @@ from django.core.exceptions import ValidationError from django.db import router from django.db.models.sql import InsertQuery from django.test import TestCase, skipUnlessDBFeature -from django.utils import six from django.utils.timezone import get_fixed_timezone from .models import ( @@ -53,10 +52,9 @@ class ModelTests(TestCase): # An empty choice field should return None for the display name. self.assertIs(a.get_status_display(), None) - # Empty strings should be returned as Unicode + # Empty strings should be returned as string a = Article.objects.get(pk=a.pk) self.assertEqual(a.misc_data, '') - self.assertIs(type(a.misc_data), six.text_type) def test_long_textfield(self): # TextFields can hold more than 4000 characters (this was broken in @@ -186,7 +184,7 @@ class ModelTests(TestCase): # Check Department and Worker (non-default PK type) d = Department.objects.create(id=10, name="IT") w = Worker.objects.create(department=d, name="Full-time") - self.assertEqual(six.text_type(w), "Full-time") + self.assertEqual(str(w), "Full-time") def test_broken_unicode(self): # Models with broken unicode methods should still have a printable repr |