cpython/Lib/test/test_email
Miss Skeleton (bot) 371146a3f8
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:07:20 -07:00
..
data
__init__.py
__main__.py
test__encoded_words.py bpo-38332: Catch KeyError from unknown cte in encoded-word. (GH-16503) 2019-10-12 10:03:24 -07:00
test__header_value_parser.py bpo-38708: email: Fix a potential IndexError when parsing Message-ID (GH-17504) 2019-12-08 18:12:50 -08:00
test_asian_codecs.py
test_contentmanager.py bpo-40597: Allow email.contextmanager set_content() to set a null string. (GH-20542) 2020-07-08 14:18:38 -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:07:20 -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:27 -07:00
test_inversion.py
test_message.py [3.8] bpo-33972: Fix EmailMessage.iter_attachments raising AttributeError (GH-14119) (GH-14380) 2019-06-25 11:38:48 -07:00
test_parser.py
test_pickleable.py
test_policy.py Fix infinite loop in email folding logic (GH-12732) 2019-07-16 11:08:36 -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