diff options
Diffstat (limited to 'Lib/test/test_email/test_email.py')
-rw-r--r-- | Lib/test/test_email/test_email.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_email/test_email.py b/Lib/test/test_email/test_email.py index 30ea77f..529d3ef 100644 --- a/Lib/test/test_email/test_email.py +++ b/Lib/test/test_email/test_email.py @@ -1653,9 +1653,12 @@ class TestMIMEText(unittest.TestCase): eq(msg.get_charset().input_charset, 'us-ascii') eq(msg['content-type'], 'text/plain; charset="us-ascii"') # Also accept a Charset instance - msg = MIMEText('hello there', _charset=Charset('utf-8')) + charset = Charset('utf-8') + charset.body_encoding = None + msg = MIMEText('hello there', _charset=charset) eq(msg.get_charset().input_charset, 'utf-8') eq(msg['content-type'], 'text/plain; charset="utf-8"') + eq(msg.get_payload(), 'hello there') def test_7bit_input(self): eq = self.assertEqual |