Skip to content
Myr

Testing that cookies actually work.

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

  • other:+8 added−6 removed

1 file+8 added−6 removed

modified:test_requests.py+8 added-6 removed
150 unmodified lines
151 r.raise_for_status()152153154 def test_cookie_jar(self):155 """156 .. todo:: This really doesn't test to make sure the cookie is working157 """158155 jar = cookielib.CookieJar()156 self.assertFalse(jar)161162 requests.get('http://google.com', cookies=jar)157 data = {'cn': 'requests_cookie', 'cv': 'awesome'}158 r = requests.post('http://www.html-kit.com/tools/cookietester/', data=data, cookies=jar, allow_redirects=True)159 self.assertTrue(jar)160 cookie_found = False161 for cookie in jar:162 if cookie.name == 'requests_cookie':163 self.assertEquals(cookie.value, 'awesome')164 cookie_found = True165 self.assertTrue(cookie_found)166167168 def test_decompress_gzip(self):169
44 unmodified lines