Fixed finally. Also requires updated httpbin.org

This commit is contained in:
Ian Cordasco
2013-07-26 10:50:19 -05:00
parent c25a72ea24
commit 972089826e
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -449,6 +449,10 @@ class Session(SessionRedirectMixin):
r = dispatch_hook('response', hooks, r, **kwargs)
# Persist cookies
if r.history:
# If the hooks create history then we want those cookies too
for resp in r.history:
extract_cookies_to_jar(self.cookies, resp.request, resp.raw)
extract_cookies_to_jar(self.cookies, request, r.raw)
# Redirect resolving generator.
+1 -1
View File
@@ -285,7 +285,7 @@ class RequestsTestCase(unittest.TestCase):
self.assertEqual(r.status_code, 401)
s = requests.session()
s.auth = auth
s.auth = HTTPDigestAuth('user', 'pass')
r = s.get(url)
self.assertEqual(r.status_code, 200)