| 905 | eq(msg['content-transfer-encoding'], '7bit') |
| 906 | |
| 907 | def test_default_cte(self): |
| 908 | eq = self.assertEqual |
| 909 | # 7bit data and the default us-ascii _charset |
| 910 | msg = MIMEText('hello world') |
| 911 | eq(msg['content-transfer-encoding'], '7bit') |
| 912 | # Similar, but with 8bit data |
| 913 | msg = MIMEText('hello \xf8 world') |
| 914 | eq(msg['content-transfer-encoding'], 'base64') |
| 915 | # And now with a different charset |
| 916 | msg = MIMEText('hello \xf8 world', _charset='iso-8859-1') |
| 917 | eq(msg['content-transfer-encoding'], 'quoted-printable') |
| 918 | |
| 919 | def test_encode7or8bit(self): |
| 920 | # Make sure a charset whose input character set is 8bit but |