From: Ian Cordasco Date: Tue, 22 Jan 2013 01:21:08 +0000 (-0500) Subject: Fix failing tests. X-Git-Tag: v1.2.0~75^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=27e814ad7682c2bd7ae8af503a9dcca7840cde64;p=services%2Fpython-requests.git Fix failing tests. --- diff --git a/requests/sessions.py b/requests/sessions.py index 173a481..4ad8d6a 100644 --- a/requests/sessions.py +++ b/requests/sessions.py @@ -275,6 +275,10 @@ class Session(SessionRedirectMixin): # Prepare the Request. prep = req.prepare() + # If auth hooks are present, they aren't passed to `dispatch_hook` + # As such, we need to update the original hooks dictionary with them + hooks.update(prep.hooks) + # Send the request. resp = self.send(prep, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies)