Skip to content
Myr

httpbin

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

  • other:+6 added−4 removed

1 file+6 added−4 removed

modified:test_requests.py+6 added-4 removed
24 unmodified lines
25 self.assertRaises(ValueError, requests.get, 'hiwpefhipowhefopw')262728 def test_HTTP_200_OK_GET(self):29 r = requests.get('http://google.com')29 r = requests.get('http://httpbin.org/')30 self.assertEqual(r.status_code, 200)313233 def test_HTTPS_200_OK_GET(self):34 r = requests.get('https://google.com')34 r = requests.get('https://httpbin.org/')35 self.assertEqual(r.status_code, 200)363738 def test_HTTP_200_OK_GET_WITH_PARAMS(self):39 heads = {'User-agent': 'Mozilla/5.0'}4041 r = requests.get('http://www.google.com/search', params={'q': 'test'}, headers=heads)41 r = requests.get('http://httpbin.org/user-agent', headers=heads)4243 assert heads['User-agent'] in r.content44 self.assertEqual(r.status_code, 200)454647 def test_HTTP_200_OK_GET_WITH_MIXED_PARAMS(self):48 heads = {'User-agent': 'Mozilla/5.0'}4948 r = requests.get('http://google.com/search?test=true', params={'q': 'test'}, headers=heads)50 r = requests.get('http://httpbin.org/get?test=true', params={'q': 'test'}, headers=heads)51 self.assertEqual(r.status_code, 200)525354 def test_user_agent_transfers(self):
161 unmodified lines