summaryrefslogtreecommitdiff
path: root/django/test/testcases.py
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 /django/test/testcases.py
parentf6acd1d271122d66de8061e75ae26137ddf02658 (diff)
Refs #23919 -- Removed six.<various>_types usage
Thanks Tim Graham and Simon Charette for the reviews.
Diffstat (limited to 'django/test/testcases.py')
-rw-r--r--django/test/testcases.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/django/test/testcases.py b/django/test/testcases.py
index 7e8cee5c0d..9d08940f5a 100644
--- a/django/test/testcases.py
+++ b/django/test/testcases.py
@@ -674,8 +674,7 @@ class SimpleTestCase(unittest.TestCase):
standardMsg = '%s != %s' % (
safe_repr(dom1, True), safe_repr(dom2, True))
diff = ('\n' + '\n'.join(difflib.ndiff(
- six.text_type(dom1).splitlines(),
- six.text_type(dom2).splitlines(),
+ str(dom1).splitlines(), str(dom2).splitlines(),
)))
standardMsg = self._truncateMessage(standardMsg, diff)
self.fail(self._formatMessage(msg, standardMsg))
@@ -712,7 +711,7 @@ class SimpleTestCase(unittest.TestCase):
data = json.loads(raw)
except ValueError:
self.fail("First argument is not valid JSON: %r" % raw)
- if isinstance(expected_data, six.string_types):
+ if isinstance(expected_data, str):
try:
expected_data = json.loads(expected_data)
except ValueError:
@@ -729,7 +728,7 @@ class SimpleTestCase(unittest.TestCase):
data = json.loads(raw)
except ValueError:
self.fail("First argument is not valid JSON: %r" % raw)
- if isinstance(expected_data, six.string_types):
+ if isinstance(expected_data, str):
try:
expected_data = json.loads(expected_data)
except ValueError:
@@ -751,10 +750,7 @@ class SimpleTestCase(unittest.TestCase):
if not result:
standardMsg = '%s != %s' % (safe_repr(xml1, True), safe_repr(xml2, True))
diff = ('\n' + '\n'.join(
- difflib.ndiff(
- six.text_type(xml1).splitlines(),
- six.text_type(xml2).splitlines(),
- )
+ difflib.ndiff(xml1.splitlines(), xml2.splitlines())
))
standardMsg = self._truncateMessage(standardMsg, diff)
self.fail(self._formatMessage(msg, standardMsg))