diff options
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 ) |
