Skip to content
Myr

fix test for python3

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kenneth Reitz · committed by Kenneth Reitz · parent 32941fd · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • tests:+2 added−2 removed

1 file+2 added−2 removed

modified:tests/test_requests.py+2 added-2 removed
464 unmodified lines
465 self.assertEqual(rbody.get('data'), 'fooaowpeuf')466467 def test_file_post_data(self):468469 filecontent = "fooaowpeufbarasjhf"469 filecontent = b"fooaowpeufbarasjhf"470 testfile = tempfile.NamedTemporaryFile()471 testfile.write(filecontent)472 testfile.flush()473
7 unmodified lines
481 self.assertEqual(r.url, service('post'))482483 rbody = json.loads(r.text)484 assert rbody.get('form') in (None, {})485 self.assertEqual(rbody.get('data'), filecontent)485 self.assertEqual(rbody.get('data'), filecontent.decode('ascii'))486487 def test_urlencoded_post_querystring(self):488489 for service in SERVICES:
456 unmodified lines