summaryrefslogtreecommitdiffstats
path: root/Lib/email
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2003-09-03 04:10:52 (GMT)
committerBarry Warsaw <barry@python.org>2003-09-03 04:10:52 (GMT)
commit2e31ce25140e6ad74f670e8c5021e0bc1bc3ac0f (patch)
tree052115b6add665007e25caf8ca3122b8cb4db5fc /Lib/email
parent2f5bf1757984c43757bf5f3d2f693f7addc2511e (diff)
downloadcpython-2e31ce25140e6ad74f670e8c5021e0bc1bc3ac0f.zip
cpython-2e31ce25140e6ad74f670e8c5021e0bc1bc3ac0f.tar.gz
cpython-2e31ce25140e6ad74f670e8c5021e0bc1bc3ac0f.tar.bz2
test_get_param_with_semis_in_quotes(): Test case for SF bug #794466.
Backport candidate.
Diffstat (limited to 'Lib/email')
-rw-r--r--Lib/email/test/test_email.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py
index a14199d..6854408 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&amp;&amp;Jill"\n')
+ self.assertEqual(msg.get_param('name'), 'Jim&amp;&amp;Jill')
+ self.assertEqual(msg.get_param('name', unquote=False),
+ '"Jim&amp;&amp;Jill"')
+
def test_has_key(self):
msg = email.message_from_string('Header: exists')
self.failUnless(msg.has_key('header'))