summaryrefslogtreecommitdiff
path: root/tests/forms_tests/field_tests
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2016-12-29 16:27:49 +0100
committerClaude Paroz <claude@2xlibre.net>2017-01-18 20:18:46 +0100
commit7b2f2e74adb36a4334e83130f6abc2f79d395235 (patch)
tree313387ba6a6f1311b43cf5fb4f2576d2d6c4f805 /tests/forms_tests/field_tests
parentf6acd1d271122d66de8061e75ae26137ddf02658 (diff)
Refs #23919 -- Removed six.<various>_types usage
Thanks Tim Graham and Simon Charette for the reviews.
Diffstat (limited to 'tests/forms_tests/field_tests')
-rw-r--r--tests/forms_tests/field_tests/test_filepathfield.py3
-rw-r--r--tests/forms_tests/field_tests/test_typedchoicefield.py3
2 files changed, 2 insertions, 4 deletions
diff --git a/tests/forms_tests/field_tests/test_filepathfield.py b/tests/forms_tests/field_tests/test_filepathfield.py
index 07ebe67f06..71164b5b7a 100644
--- a/tests/forms_tests/field_tests/test_filepathfield.py
+++ b/tests/forms_tests/field_tests/test_filepathfield.py
@@ -2,12 +2,11 @@ import os.path
from django.forms import FilePathField, ValidationError, forms
from django.test import SimpleTestCase
-from django.utils import six
from django.utils._os import upath
def fix_os_paths(x):
- if isinstance(x, six.string_types):
+ if isinstance(x, str):
return x.replace('\\', '/')
elif isinstance(x, tuple):
return tuple(fix_os_paths(list(x)))
diff --git a/tests/forms_tests/field_tests/test_typedchoicefield.py b/tests/forms_tests/field_tests/test_typedchoicefield.py
index c08a8bb611..bf0fdb4d47 100644
--- a/tests/forms_tests/field_tests/test_typedchoicefield.py
+++ b/tests/forms_tests/field_tests/test_typedchoicefield.py
@@ -2,7 +2,6 @@ import decimal
from django.forms import TypedChoiceField, ValidationError
from django.test import SimpleTestCase
-from django.utils import six
class TypedChoiceFieldTest(SimpleTestCase):
@@ -53,7 +52,7 @@ class TypedChoiceFieldTest(SimpleTestCase):
self.assertFalse(f.has_changed('1', '1'))
f = TypedChoiceField(
- choices=[('', '---------'), ('a', "a"), ('b', "b")], coerce=six.text_type,
+ choices=[('', '---------'), ('a', "a"), ('b', "b")], coerce=str,
required=False, initial=None, empty_value=None,
)
self.assertFalse(f.has_changed(None, ''))