Skip to content

Commit

Permalink
test: Fix tests for Python 2
Browse files Browse the repository at this point in the history
  • Loading branch information
defnull committed Aug 28, 2024
1 parent 8335971 commit 490eb1e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions test/test_multipart.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def assertForm(self, name, data):
if part.name != name: continue
self.assertEqual(part.filename, None)
self.assertEqual(part.content_type, None)
self.assertEqual(part.charset, "utf8")
self.assertEqual(part.value, data)
break
else:
Expand Down Expand Up @@ -340,7 +341,7 @@ def test_no_disposition_header(self):
),
),
},
"forms": {"text": "example text"},
"forms": {"text": u"example text"},
}

browser_test_cases["firefox3-2pnglongtext"] = {
Expand Down Expand Up @@ -427,7 +428,7 @@ def test_no_disposition_header(self):
),
),
},
"forms": {"text": "--long text\r\n--with boundary\r\n--lookalikes--"},
"forms": {"text": u"--long text\r\n--with boundary\r\n--lookalikes--"},
}

browser_test_cases["opera8-2png1txt"] = {
Expand Down Expand Up @@ -506,7 +507,7 @@ def test_no_disposition_header(self):
),
),
},
"forms": {"text": "blafasel öäü"},
"forms": {"text": u"blafasel öäü"},
}

browser_test_cases["webkit3-2png1txt"] = {
Expand Down Expand Up @@ -608,7 +609,7 @@ def test_no_disposition_header(self):
),
),
},
"forms": {"text": "this is another text with ümläüts"},
"forms": {"text": u"this is another text with ümläüts"},
}

browser_test_cases["ie6-2png1txt"] = {
Expand Down Expand Up @@ -687,7 +688,7 @@ def test_no_disposition_header(self):
),
),
},
"forms": {"text": "ie6 sucks :-/"},
"forms": {"text": u"ie6 sucks :-/"},
}

class TestWerkzeugExamples(BaseMultipartTest):
Expand Down

0 comments on commit 490eb1e

Please sign in to comment.