MCPcopy Index your code
hub / github.com/python/cpython / test_binary_quopri_payload

Method test_binary_quopri_payload

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

Source from the content-addressed store, hash-verified

794 self.assertIn(f"{name!r}", str(cm.exception))
795
796 def test_binary_quopri_payload(self):
797 for charset in ('latin-1', 'ascii'):
798 msg = Message()
799 msg['content-type'] = 'text/plain; charset=%s' % charset
800 msg['content-transfer-encoding'] = 'quoted-printable'
801 msg.set_payload(b'foo=e6=96=87bar')
802 self.assertEqual(
803 msg.get_payload(decode=True),
804 b'foo\xe6\x96\x87bar',
805 'get_payload returns wrong result with charset %s.' % charset)
806
807 def test_binary_base64_payload(self):
808 for charset in ('latin-1', 'ascii'):

Callers

nothing calls this directly

Calls 4

set_payloadMethod · 0.95
get_payloadMethod · 0.95
MessageClass · 0.90
assertEqualMethod · 0.45

Tested by

no test coverage detected