Skip to content

Commit

Permalink
fix test for python3
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenneth Reitz committed Jun 8, 2012
1 parent 32941fd commit 10d2398
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ def test_nonurlencoded_post_data(self):

def test_file_post_data(self):

filecontent = "fooaowpeufbarasjhf"
filecontent = b"fooaowpeufbarasjhf"
testfile = tempfile.NamedTemporaryFile()
testfile.write(filecontent)
testfile.flush()
Expand All @@ -482,7 +482,7 @@ def test_file_post_data(self):

rbody = json.loads(r.text)
assert rbody.get('form') in (None, {})
self.assertEqual(rbody.get('data'), filecontent)
self.assertEqual(rbody.get('data'), filecontent.decode('ascii'))

def test_urlencoded_post_querystring(self):

Expand Down

0 comments on commit 10d2398

Please sign in to comment.