summaryrefslogtreecommitdiff
path: root/tests/mail
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mail')
-rw-r--r--tests/mail/tests.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/mail/tests.py b/tests/mail/tests.py
index bc0d8eabc9..662cd7c6d6 100644
--- a/tests/mail/tests.py
+++ b/tests/mail/tests.py
@@ -572,6 +572,8 @@ class MailTests(HeadersCheckMixin, SimpleTestCase):
)
s = msg.message().as_bytes()
self.assertIn(b'Content-Transfer-Encoding: 8bit', s)
+ s = msg.message().as_string()
+ self.assertIn(str('Content-Transfer-Encoding: 8bit'), s)
msg = EmailMessage(
'Subject', 'Body with non latin characters: А Б В Г Д Е Ж Ѕ З И І К Л М Н О П.', 'bounce@example.com',
@@ -579,6 +581,8 @@ class MailTests(HeadersCheckMixin, SimpleTestCase):
)
s = msg.message().as_bytes()
self.assertIn(b'Content-Transfer-Encoding: 8bit', s)
+ s = msg.message().as_string()
+ self.assertIn(str('Content-Transfer-Encoding: 8bit'), s)
def test_dont_base64_encode_message_rfc822(self):
# Ticket #18967