Skip to content

Commit

Permalink
Add test to parse_multipart_form_data() when no "name" parameter is f…
Browse files Browse the repository at this point in the history
…ound
  • Loading branch information
igorsobreira committed Jan 25, 2012
1 parent 97009a3 commit b12edb1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tornado/test/httputil_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,18 @@ def test_line_does_not_end_with_correct_line_break(self):
parse_multipart_form_data(b("1234"), data, args, files)
self.assertEqual(files, {})

def test_content_disposition_header_without_name_parameter(self):
data = b("""\
--1234
Content-Disposition: form-data; filename="ab.txt"
Foo
--1234--""").replace(b("\n"), b("\r\n"))
args = {}
files = {}
parse_multipart_form_data(b("1234"), data, args, files)
self.assertEqual(files, {})


class HTTPHeadersTest(unittest.TestCase):
def test_multi_line(self):
Expand Down

0 comments on commit b12edb1

Please sign in to comment.