Skip to content
Myr

trailing

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 fa47067 · Browse files · 1 file+3 added−3 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+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:test_requests.py+3 added-3 removed
510 unmodified lines
511 self.assertEqual(curl_from_request(r.request), curl_str)512513514 def test_curl_POSTBIN_GET_POST_FILES(self):515 curl_str = 'curl -L -X POST -H "Accept-Encoding:gzip" -H "User-Agent:python-requests.org" -d "some=data" "http://httpbin.org/post"' 515 curl_str = 'curl -L -X POST -H "Accept-Encoding:gzip" -H "User-Agent:python-requests.org" -d "some=data" "http://httpbin.org/post"'516 post = requests.post(httpbin('post'), data={'some': 'data'})517 self.assertEqual(curl_from_request(post.request), curl_str)518519 curl_str = 'curl -L -X POST -H "Accept-Encoding:gzip" -H "User-Agent:python-requests.org" -F "some=@test_requests.py" "https://httpbin.ep.io/post"' 519 curl_str = 'curl -L -X POST -H "Accept-Encoding:gzip" -H "User-Agent:python-requests.org" -F "some=@test_requests.py" "https://httpbin.ep.io/post"'520 post2 = requests.post(httpsbin('post'), files={'some': open('test_requests.py')})521 self.assertEqual(curl_from_request(post2.request), curl_str)522523 curl_str = 'curl -L -X POST -H "Accept-Encoding:gzip" -H "User-Agent:python-requests.org" -d \'[{"some": "json"}]\' "http://httpbin.org/post"' 523 curl_str = 'curl -L -X POST -H "Accept-Encoding:gzip" -H "User-Agent:python-requests.org" -d \'[{"some": "json"}]\' "http://httpbin.org/post"'524 post3 = requests.post(httpbin('post'), data='[{"some": "json"}]')525 self.assertEqual(curl_from_request(post3.request), curl_str)526527
2 unmodified lines