(self)
| 2443 | # Test RFC 2047 header encoding and decoding |
| 2444 | class TestRFC2047(TestEmailBase): |
| 2445 | def test_rfc2047_multiline(self): |
| 2446 | eq = self.assertEqual |
| 2447 | s = """Re: =?mac-iceland?q?r=8Aksm=9Arg=8Cs?= baz |
| 2448 | foo bar =?mac-iceland?q?r=8Aksm=9Arg=8Cs?=""" |
| 2449 | dh = decode_header(s) |
| 2450 | eq(dh, [ |
| 2451 | (b'Re: ', None), |
| 2452 | (b'r\x8aksm\x9arg\x8cs', 'mac-iceland'), |
| 2453 | (b' baz foo bar ', None), |
| 2454 | (b'r\x8aksm\x9arg\x8cs', 'mac-iceland')]) |
| 2455 | header = make_header(dh) |
| 2456 | eq(str(header), |
| 2457 | 'Re: r\xe4ksm\xf6rg\xe5s baz foo bar r\xe4ksm\xf6rg\xe5s') |
| 2458 | self.ndiffAssertEqual(header.encode(maxlinelen=76), """\ |
| 2459 | Re: =?mac-iceland?q?r=8Aksm=9Arg=8Cs?= baz foo bar =?mac-iceland?q?r=8Aksm?= |
| 2460 | =?mac-iceland?q?=9Arg=8Cs?=""") |
| 2461 | |
| 2462 | def test_whitespace_keeper_unicode(self): |
| 2463 | eq = self.assertEqual |
nothing calls this directly
no test coverage detected