Skip to content
Myr

add autoauth tuple http basic test

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

  • other:+8 added−1 removed

1 file+8 added−1 removed

modified:test_requests.py+8 added-1 removed
69 unmodified lines
70 requests.auth_manager.empty()7172 def test_POSTBIN_GET_POST_FILES(self):73 bin = requests.post('http://www.postbin.org/')74 print bin.url74 self.assertEqual(bin.status_code, 200)7576 post = requests.post(bin.url, data={'some': 'data'})77 self.assertEqual(post.status_code, 201)
52 unmodified lines
130131 r = requests.get('http://api.stackoverflow.com/1.1/users/495995/top-answer-tags')132 r.content.decode('ascii')133134 def test_autoauth(self):135136 conv_auth = ('requeststest', 'requeststest')137 requests.auth_manager.add_auth('convore.com', conv_auth)138139 r = requests.get('https://convore.com/api/account/verify.json')140 self.assertEquals(r.status_code, 200)141142if __name__ == '__main__':143 unittest.main()