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/custom_pk | |
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/custom_pk')
-rw-r--r-- | tests/custom_pk/fields.py | 5 | ||||
-rw-r--r-- | tests/custom_pk/tests.py | 17 |
2 files changed, 10 insertions, 12 deletions
diff --git a/tests/custom_pk/fields.py b/tests/custom_pk/fields.py index eb63f66679..fa61a72a0d 100644 --- a/tests/custom_pk/fields.py +++ b/tests/custom_pk/fields.py @@ -2,7 +2,6 @@ import random import string from django.db import models -from django.utils import six class MyWrapper(object): @@ -50,12 +49,12 @@ class MyAutoField(models.CharField): if not value: return if isinstance(value, MyWrapper): - return six.text_type(value) + return str(value) return value def get_db_prep_value(self, value, connection, prepared=False): if not value: return if isinstance(value, MyWrapper): - return six.text_type(value) + return str(value) return value diff --git a/tests/custom_pk/tests.py b/tests/custom_pk/tests.py index 01150a46d2..7c89b6d120 100644 --- a/tests/custom_pk/tests.py +++ b/tests/custom_pk/tests.py @@ -1,6 +1,5 @@ from django.db import IntegrityError, transaction from django.test import TestCase, skipIfDBFeature -from django.utils import six from .models import Bar, Business, Employee, Foo @@ -25,14 +24,14 @@ class BasicCustomPKTests(TestCase): Employee.objects.filter(pk=123), [ "Dan Jones", ], - six.text_type + str ) self.assertQuerysetEqual( Employee.objects.filter(employee_code=123), [ "Dan Jones", ], - six.text_type + str ) self.assertQuerysetEqual( @@ -40,7 +39,7 @@ class BasicCustomPKTests(TestCase): "Fran Bones", "Dan Jones", ], - six.text_type + str ) self.assertQuerysetEqual( @@ -48,7 +47,7 @@ class BasicCustomPKTests(TestCase): "Fran Bones", "Dan Jones", ], - six.text_type + str ) self.assertQuerysetEqual( @@ -73,7 +72,7 @@ class BasicCustomPKTests(TestCase): "Fran Bones", "Dan Jones", ], - six.text_type + str ) self.assertQuerysetEqual( self.fran.business_set.all(), [ @@ -91,14 +90,14 @@ class BasicCustomPKTests(TestCase): "Fran Bones", "Dan Jones", ], - six.text_type, + str, ) self.assertQuerysetEqual( Employee.objects.filter(business__pk="Sears"), [ "Fran Bones", "Dan Jones", ], - six.text_type, + str, ) self.assertQuerysetEqual( @@ -173,7 +172,7 @@ class BasicCustomPKTests(TestCase): "Dan Jones", "Fran Jones", ], - six.text_type + str ) |