summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_email.py
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2001-10-25 22:43:46 (GMT)
committerBarry Warsaw <barry@python.org>2001-10-25 22:43:46 (GMT)
commit2539cf5aadd5c7d6ceb6e8db36c98ed83ca62b48 (patch)
treef739416fd490819f86fc025dd55a4d1597e2638a /Lib/test/test_email.py
parente674ca737dc65a14ef8b417d198727a744e8d84c (diff)
downloadcpython-2539cf5aadd5c7d6ceb6e8db36c98ed83ca62b48.zip
cpython-2539cf5aadd5c7d6ceb6e8db36c98ed83ca62b48.tar.gz
cpython-2539cf5aadd5c7d6ceb6e8db36c98ed83ca62b48.tar.bz2
A fix for SF bug #472560, extra newlines returned by get_param() when
the separating semi-colon shows up on a continuation line (legal, but weird). Bug reported and fixed by Matthew Cowles. Test case and sample email included.
Diffstat (limited to 'Lib/test/test_email.py')
-rw-r--r--Lib/test/test_email.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_email.py b/Lib/test/test_email.py
index b2dfce4..d397c09 100644
--- a/Lib/test/test_email.py
+++ b/Lib/test/test_email.py
@@ -218,6 +218,10 @@ class TestMessageAPI(TestEmailBase):
eq(msg.get_param('bar', header='x-header'), 'one')
eq(msg.get_param('baz', header='x-header'), 'two')
+ def test_get_param_funky_continuation_lines(self):
+ msg = self._msgobj('msg_22.txt')
+ self.assertEqual(msg.get_payload(1).get_param('name'), 'wibble.JPG')
+
def test_has_key(self):
msg = email.message_from_string('Header: exists')
self.failUnless(msg.has_key('header'))