bpo-29979: Rewrite cgi.parse_multipart to make it consistent with FieldStorage (#991)

This commit is contained in:
Pierre Quentel 2017-05-08 14:08:34 +02:00 committed by Senthil Kumaran
parent f34c685020
commit cc3fa204d3
5 changed files with 38 additions and 102 deletions

View file

@ -126,8 +126,8 @@ def test_parse_multipart(self):
env = {'boundary': BOUNDARY.encode('latin1'),
'CONTENT-LENGTH': '558'}
result = cgi.parse_multipart(fp, env)
expected = {'submit': [b' Add '], 'id': [b'1234'],
'file': [b'Testing 123.\n'], 'title': [b'']}
expected = {'submit': [' Add '], 'id': ['1234'],
'file': [b'Testing 123.\n'], 'title': ['']}
self.assertEqual(result, expected)
def test_fieldstorage_properties(self):