Skip to content

Commit

Permalink
Add test to parse_multipart_form_data() when missing headers
Browse files Browse the repository at this point in the history
  • Loading branch information
igorsobreira committed Jan 25, 2012
1 parent 554570d commit 76b002e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tornado/test/httputil_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,16 @@ def test_boundary_starts_and_ends_with_quotes(self):
self.assertEqual(file["filename"], "ab.txt")
self.assertEqual(file["body"], b("Foo"))

def test_missing_headers(self):
data = b('''\
--1234
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 76b002e

Please sign in to comment.