Skip to content
Myr

postbin tests were broken

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 b252cd8 · Browse files · 1 file+13 added−19 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+13 added−19 removed

  • other:+13 added−19 removed

1 file+13 added−19 removed

modified:test_requests.py+13 added-19 removed
61 unmodified lines
62 # reset auto authentication63 requests.auth_manager.empty()6465 def test_POSTBIN_GET_POST_FILES(self):66 h = {'Content-type': 'application/x-www-form-urlencoded'}67 68 bin = requests.post('http://www.postbin.org/', headers=h)6667 bin = requests.post('http://www.postbin.org/')69 # self.assertEqual(bin.status_code, 200)70 68 print bin.url72 print bin.status_code73 74 # post = requests.post(bin.url, data={'some': 'data'})75 # self.assertEqual(post.status_code, 200)76 77 # post2 = requests.post(bin.url, files={'some': open('test_requests.py')})78 # self.assertEqual(post2.status_code, 200)69 self.assertEqual(bin.status_code, 200)70 71 post = requests.post(bin.url, data={'some': 'data'})72 self.assertEqual(post.status_code, 201)80 7374 post2 = requests.post(bin.url, files={'some': open('test_requests.py')})75 self.assertEqual(post2.status_code, 201)7677 def test_POSTBIN_GET_POST_FILES_WITH_PARAMS(self):78 # TODO: postbin w/ params83 bin = requests.get('http://www.postbin.org/')79 bin = requests.post('http://www.postbin.org/')80 print bin.url81 self.assertEqual(bin.status_code, 200)85 86 post = requests.post(bin.url, data={'some': 'data'})87 self.assertEqual(post.status_code, 200)88 8283 post2 = requests.post(bin.url, files={'some': open('test_requests.py')}, data={'some': 'data'})90 # self.assertEqual(post2.status_code, 200)84 self.assertEqual(post2.status_code, 201)8586 def test_nonzero_evaluation(self):87 r = requests.get('http://google.com/some-404-url')88 self.assertEqual(bool(r), False)
21 unmodified lines