1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Refs #23919 -- Removed six.<various>_types usage

Thanks Tim Graham and Simon Charette for the reviews.
This commit is contained in:
Claude Paroz
2016-12-29 16:27:49 +01:00
parent f6acd1d271
commit 7b2f2e74ad
213 changed files with 574 additions and 763 deletions

View File

@@ -26,7 +26,7 @@ from django.test import SimpleTestCase, override_settings
from django.test.utils import requires_tz_support
from django.utils._os import upath
from django.utils.encoding import force_bytes, force_text
from django.utils.six import StringIO, binary_type
from django.utils.six import StringIO
from django.utils.translation import ugettext_lazy
@@ -40,7 +40,7 @@ class HeadersCheckMixin(object):
with the contents of an email message.
headers: should be a set of (header-name, header-value) tuples.
"""
if isinstance(message, binary_type):
if isinstance(message, bytes):
message = message_from_bytes(message)
msg_headers = set(message.items())
self.assertTrue(headers.issubset(msg_headers), msg='Message is missing '