From: R David Murray Date: Thu, 25 Jul 2013 16:11:55 +0000 (-0400) Subject: #18503: small cleanups in test_email. X-Git-Tag: v3.4.0a1~86^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=271ade87acbe7b89653ea4faebb80812f27c12c3;p=python #18503: small cleanups in test_email. Patch by Vajrasky Kok. --- diff --git a/Lib/test/test_email/test_email.py b/Lib/test/test_email/test_email.py index 8757924522..4c8295200b 100644 --- a/Lib/test/test_email/test_email.py +++ b/Lib/test/test_email/test_email.py @@ -388,6 +388,7 @@ class TestMessageAPI(TestEmailBase): def test_del_param_on_nonexistent_header(self): msg = Message() + # Deleting param on empty msg should not raise exception. msg.del_param('filename', 'content-disposition') def test_del_nonexistent_param(self): @@ -395,7 +396,7 @@ class TestMessageAPI(TestEmailBase): msg.add_header('Content-Type', 'text/plain', charset='utf-8') existing_header = msg['Content-Type'] msg.del_param('foobar', header='Content-Type') - self.assertEqual(msg['Content-Type'], 'text/plain; charset="utf-8"') + self.assertEqual(msg['Content-Type'], existing_header) def test_set_type(self): eq = self.assertEqual @@ -2265,7 +2266,6 @@ class TestMIMEMessage(TestEmailBase): eq(subpart['subject'], subject) def test_bad_multipart(self): - eq = self.assertEqual msg1 = Message() msg1['Subject'] = 'subpart 1' msg2 = Message()