From: Barry Warsaw Date: Wed, 3 Sep 2003 04:10:52 +0000 (+0000) Subject: test_get_param_with_semis_in_quotes(): Test case for SF bug #794466. X-Git-Tag: v2.4a1~1656 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2e31ce25140e6ad74f670e8c5021e0bc1bc3ac0f;p=python test_get_param_with_semis_in_quotes(): Test case for SF bug #794466. Backport candidate. --- diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py index a14199d9ac..6854408e35 100644 --- a/Lib/email/test/test_email.py +++ b/Lib/email/test/test_email.py @@ -313,6 +313,13 @@ class TestMessageAPI(TestEmailBase): msg = self._msgobj('msg_22.txt') self.assertEqual(msg.get_payload(1).get_param('name'), 'wibble.JPG') + def test_get_param_with_semis_in_quotes(self): + msg = email.message_from_string( + 'Content-Type: image/pjpeg; name="Jim&&Jill"\n') + self.assertEqual(msg.get_param('name'), 'Jim&&Jill') + self.assertEqual(msg.get_param('name', unquote=False), + '"Jim&&Jill"') + def test_has_key(self): msg = email.message_from_string('Header: exists') self.failUnless(msg.has_key('header'))