mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
#14380: Make actual default match docs, fix __init__ order.
Éric pointed out that given that the default was documented as None, someone would reasonably pass that to get the default behavior. In fixing the code to use None, I noticed that the change to _charset was being done after it had already been passed to MIMENonMultipart. The change to the test verifies that the order is now correct.
This commit is contained in:
parent
8680bcc5db
commit
42243c4dca
2 changed files with 10 additions and 9 deletions
|
|
@ -621,15 +621,14 @@ class TestMessageAPI(TestEmailBase):
|
|||
# Issue 14291
|
||||
m = MIMEText('É testabc\n')
|
||||
self.assertEqual(str(m),textwrap.dedent("""\
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: base64
|
||||
|
||||
w4kgdGVzdGFiYwo=
|
||||
"""))
|
||||
|
||||
|
||||
|
||||
# Test the email.encoders module
|
||||
class TestEncoders(unittest.TestCase):
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue