From 27e814ad7682c2bd7ae8af503a9dcca7840cde64 Mon Sep 17 00:00:00 2001 From: Ian Cordasco Date: Mon, 21 Jan 2013 20:21:08 -0500 Subject: [PATCH] Fix failing tests. --- requests/sessions.py | 4 ++++ 1 file changed, 4 insertions(+) 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) -- 2.7.4