MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_multiline_header

Method test_multiline_header

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

Source from the content-addressed store, hash-verified

2559 self.assertEqual(str(make_header(decode_header(s))), '(a b)')
2560
2561 def test_multiline_header(self):
2562 s = '=?windows-1252?q?=22M=FCller_T=22?=\r\n <T.Mueller@xxx.com>'
2563 self.assertEqual(decode_header(s),
2564 [(b'"M\xfcller T"', 'windows-1252'),
2565 (b'<T.Mueller@xxx.com>', None)])
2566 self.assertEqual(make_header(decode_header(s)).encode(),
2567 ''.join(s.splitlines()))
2568 self.assertEqual(str(make_header(decode_header(s))),
2569 '"Müller T" <T.Mueller@xxx.com>')
2570
2571 def test_unencoded_ascii(self):
2572 # bpo-22833/gh-67022: returns [(str, None)] rather than [(bytes, None)]

Callers

nothing calls this directly

Calls 7

decode_headerFunction · 0.90
make_headerFunction · 0.90
strFunction · 0.85
assertEqualMethod · 0.45
encodeMethod · 0.45
joinMethod · 0.45
splitlinesMethod · 0.45

Tested by

no test coverage detected