Skip to content
Myr

Porting cookie test to httpbin.org.

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

authored by Zbigniew Siciarz · committed by Zbigniew Siciarz · parent 1f12117 · Browse files · 1 file+5 added−6 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+5 added−6 removed

  • other:+5 added−6 removed

1 file+5 added−6 removed

modified:test_requests.py+5 added-6 removed
168 unmodified lines
169170171 def test_cookie_jar(self):172173 # TODO: port to httpbin174173 jar = cookielib.CookieJar()174 self.assertFalse(jar)175178 data = {'cn': 'requests_cookie', 'cv': 'awesome'}179180 r = requests.post('http://www.html-kit.com/tools/cookietester/', data=data, cookies=jar, allow_redirects=True)181176 url = httpbin('cookies', 'set', 'requests_cookie', 'awesome')177 r = requests.get(url, cookies=jar)178 self.assertTrue(jar)179180 cookie_found = False181 for cookie in jar:
1 unmodified line
183 self.assertEquals(cookie.value, 'awesome')184 cookie_found = True185 self.assertTrue(cookie_found)186187 r = requests.get(httpbin('cookies'), cookies=jar)188 self.assertTrue('awesome' in r.content)189190191 def test_decompress_gzip(self):192193 r = requests.get(httpbin('gzip'))194 r.content.decode('ascii')
44 unmodified lines