MCPcopy Create free account
hub / github.com/python/cpython / test_7bit_input_no_charset

Method test_7bit_input_no_charset

Lib/test/test_email/test_email.py:1848–1853  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1846 eq(msg['content-type'], 'text/plain; charset="us-ascii"')
1847
1848 def test_7bit_input_no_charset(self):
1849 eq = self.assertEqual
1850 msg = MIMEText('hello there')
1851 eq(msg.get_charset(), 'us-ascii')
1852 eq(msg['content-type'], 'text/plain; charset="us-ascii"')
1853 self.assertIn('hello there', msg.as_string())
1854
1855 def test_utf8_input(self):
1856 teststr = '\u043a\u0438\u0440\u0438\u043b\u0438\u0446\u0430'

Callers

nothing calls this directly

Calls 5

MIMETextClass · 0.90
eqFunction · 0.85
get_charsetMethod · 0.80
assertInMethod · 0.80
as_stringMethod · 0.45

Tested by

no test coverage detected