cpython/Lib/test/test_email
Miss Skeleton (bot) 72ce82abcf
bpo-27321 Fix email.generator.py to not replace a non-existent header. (GH-18074)
This PR replaces GH-1977. The reason for the replacement is two-fold.

The fix itself is different is that if the CTE header doesn't exist in the original message, it is inserted. This is important because the new CTE could be quoted-printable whereas the original is implicit 8bit.

Also the tests are different. The test_nonascii_as_string_without_cte test in GH-1977 doesn't actually test the issue in that it passes without the fix. The test_nonascii_as_string_without_content_type_and_cte test is improved here, and even though it doesn't fail without the fix, it is included for completeness.

Automerge-Triggered-By: @warsaw
(cherry picked from commit bf838227c3)

Co-authored-by: Mark Sapiro <mark@msapiro.net>
2020-10-19 16:11:37 -07:00
..
data
__init__.py Merge with 3.5 2016-09-09 12:09:07 -07:00
__main__.py
test__encoded_words.py bpo-38332: Catch KeyError from unknown cte in encoded-word. (GH-16503) 2019-10-05 09:19:15 -07:00
test__header_value_parser.py bpo-38708: email: Fix a potential IndexError when parsing Message-ID (GH-17504) 2019-12-08 17:37:34 -08:00
test_asian_codecs.py Merge with 3.5 2016-05-06 17:35:21 -04:00
test_contentmanager.py bpo-40597: Allow email.contextmanager set_content() to set a null string. (GH-20542) 2020-07-08 14:21:00 -07:00
test_defect_handling.py bpo-27397: Make email module properly handle invalid-length base64 strings (#7583) 2018-06-12 15:46:22 +03:00
test_email.py bpo-27321 Fix email.generator.py to not replace a non-existent header. (GH-18074) 2020-10-19 16:11:37 -07:00
test_generator.py bpo-34424: Handle different policy.linesep lengths correctly. (#8803) 2019-05-13 21:07:39 -04:00
test_headerregistry.py bpo-39040: Fix parsing of email mime headers with whitespace between encoded-words. (gh-17620) 2020-05-29 04:43:06 -07:00
test_inversion.py #28047: Fix calculation of base64 line length. 2016-09-09 15:00:09 -04:00
test_message.py bpo-33972: Fix EmailMessage.iter_attachments raising AttributeError. (GH-14119) 2019-06-25 10:03:19 -07:00
test_parser.py #20476: add a message_factory policy attribute to email. 2016-09-09 18:39:18 -04:00
test_pickleable.py
test_policy.py Fix infinite loop in email folding logic (GH-12732) 2019-07-16 10:50:01 -07:00
test_utils.py bpo-35317: Fix mktime() error in test_email (GH-10721) 2018-11-27 12:40:50 +01:00
torture_test.py Issue 26912: fix broken imports in test_email package. 2016-05-06 17:35:05 -04:00