1
0
mirror of https://github.com/django/django.git synced 2025-10-26 15:16:09 +00:00

[py3] Replaced unicode/str by six.text_type/bytes.

This commit is contained in:
Aymeric Augustin
2012-07-20 14:48:51 +02:00
parent 3cb2457f46
commit bdca5ea345
96 changed files with 376 additions and 294 deletions

View File

@@ -38,6 +38,7 @@ from django.test.utils import (get_warnings_state, restore_warnings_state,
from django.test.utils import ContextList
from django.utils import unittest as ut2
from django.utils.encoding import smart_str, force_unicode
from django.utils import six
from django.utils.unittest.util import safe_repr
from django.views.static import serve
@@ -421,8 +422,8 @@ class SimpleTestCase(ut2.TestCase):
standardMsg = '%s != %s' % (
safe_repr(dom1, True), safe_repr(dom2, True))
diff = ('\n' + '\n'.join(difflib.ndiff(
unicode(dom1).splitlines(),
unicode(dom2).splitlines())))
six.text_type(dom1).splitlines(),
six.text_type(dom2).splitlines())))
standardMsg = self._truncateMessage(standardMsg, diff)
self.fail(self._formatMessage(msg, standardMsg))