mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
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.
This commit is contained in:
parent
e674ca737d
commit
2539cf5aad
3 changed files with 51 additions and 1 deletions
|
|
@ -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'))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue