summaryrefslogtreecommitdiff
path: root/tests/mail
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2018-08-04 10:15:51 -0400
committerTim Graham <timograham@gmail.com>2018-08-04 10:15:51 -0400
commitec594942cdb0418b5b2ca493f7b8f0e3dd132912 (patch)
treea3d8102e5fd7aa9a706e1333d57f976b1523b26f /tests/mail
parentec9d0123e0bf17b6219630ebe1c5f7240acc2743 (diff)
downloaddjango-ec594942cdb0418b5b2ca493f7b8f0e3dd132912.tar.gz
Removed unnecessary str() in mail tests.
Unnecessary since their introduction in fa75b2cb512409116b6f1b5229d6f99074d8e452.
Diffstat (limited to 'tests/mail')
-rw-r--r--tests/mail/tests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/mail/tests.py b/tests/mail/tests.py
index 77e1378192..b2de5e4c10 100644
--- a/tests/mail/tests.py
+++ b/tests/mail/tests.py
@@ -1144,7 +1144,7 @@ class ConsoleBackendTests(BaseEmailBackendTests, SimpleTestCase):
def get_mailbox_content(self):
messages = self.stream.getvalue().split('\n' + ('-' * 79) + '\n')
- return [message_from_bytes(str(m).encode()) for m in messages if m]
+ return [message_from_bytes(m.encode()) for m in messages if m]
def test_console_stream_kwarg(self):
"""
@@ -1153,7 +1153,7 @@ class ConsoleBackendTests(BaseEmailBackendTests, SimpleTestCase):
s = StringIO()
connection = mail.get_connection('django.core.mail.backends.console.EmailBackend', stream=s)
send_mail('Subject', 'Content', 'from@example.com', ['to@example.com'], connection=connection)
- message = str(s.getvalue().split('\n' + ('-' * 79) + '\n')[0]).encode()
+ message = s.getvalue().split('\n' + ('-' * 79) + '\n')[0].encode()
self.assertMessageHasHeaders(message, {
('MIME-Version', '1.0'),
('Content-Type', 'text/plain; charset="utf-8"'),