Add proxy to httplib2.Http.connections (#91)
diff --git a/httplib2_transport/google_auth_httplib2.py b/httplib2_transport/google_auth_httplib2.py
index 598ccb3..866841b 100644
--- a/httplib2_transport/google_auth_httplib2.py
+++ b/httplib2_transport/google_auth_httplib2.py
@@ -223,3 +223,13 @@
**kwargs)
return response, content
+
+ @property
+ def connections(self):
+ """Proxy to httplib2.Http.connections."""
+ return self.http.connections
+
+ @connections.setter
+ def connections(self, value):
+ """Proxy to httplib2.Http.connections."""
+ self.http.connections = value
diff --git a/httplib2_transport/setup.py b/httplib2_transport/setup.py
index 110cce8..e85c309 100644
--- a/httplib2_transport/setup.py
+++ b/httplib2_transport/setup.py
@@ -30,7 +30,7 @@
setup(
name='google-auth-httplib2',
- version='0.0.1',
+ version='0.0.2',
author='Google Cloud Platform',
author_email='jonwayne+google-auth@google.com',
description='Google Authentication Library',
diff --git a/httplib2_transport/tests/test_google_auth_httplib2.py b/httplib2_transport/tests/test_google_auth_httplib2.py
index 9c2da70..635965f 100644
--- a/httplib2_transport/tests/test_google_auth_httplib2.py
+++ b/httplib2_transport/tests/test_google_auth_httplib2.py
@@ -86,6 +86,15 @@
assert authed_http.credentials == mock.sentinel.credentials
assert isinstance(authed_http.http, httplib2.Http)
+ def test_connections(self):
+ authed_http = google_auth_httplib2.AuthorizedHttp(
+ mock.sentinel.credentials)
+
+ assert authed_http.connections == authed_http.http.connections
+
+ authed_http.connections = mock.sentinel.connections
+ assert authed_http.http.connections == mock.sentinel.connections
+
def test_request_no_refresh(self):
mock_credentials = mock.Mock(wraps=MockCredentials())
mock_response = MockResponse()