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
__main__.py
test__encoded_words.py
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
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
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
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
test_message.py
test_parser.py
test_pickleable.py
test_policy.py
test_utils.py
torture_test.py