GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add proxy to httplib2.Http.connections (#91) · googleapis/google-cloud-python@bb2f446

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/google-auth/httplib2_transport
    • google_auth_httplib2.py
    • setup.py
    • tests
      • test_google_auth_httplib2.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/google-auth/httplib2_transport/google_auth_httplib2.py‎

Copy file name to clipboardExpand all lines: packages/google-auth/httplib2_transport/google_auth_httplib2.py
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,3 +223,13 @@ def request(self, uri, method='GET', body=None, headers=None,
223223
**kwargs)
224224

225225
return response, content
226+
227+
@property
228+
def connections(self):
229+
"""Proxy to httplib2.Http.connections."""
230+
return self.http.connections
231+
232+
@connections.setter
233+
def connections(self, value):
234+
"""Proxy to httplib2.Http.connections."""
235+
self.http.connections = value
Collapse file

‎packages/google-auth/httplib2_transport/setup.py‎

Copy file name to clipboardExpand all lines: packages/google-auth/httplib2_transport/setup.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
setup(
3232
name='google-auth-httplib2',
33-
version='0.0.1',
33+
version='0.0.2',
3434
author='Google Cloud Platform',
3535
author_email='[email protected]',
3636
description='Google Authentication Library',
Collapse file

‎packages/google-auth/httplib2_transport/tests/test_google_auth_httplib2.py‎

Copy file name to clipboardExpand all lines: packages/google-auth/httplib2_transport/tests/test_google_auth_httplib2.py
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,15 @@ def test_authed_http_defaults(self):
8686
assert authed_http.credentials == mock.sentinel.credentials
8787
assert isinstance(authed_http.http, httplib2.Http)
8888

89+
def test_connections(self):
90+
authed_http = google_auth_httplib2.AuthorizedHttp(
91+
mock.sentinel.credentials)
92+
93+
assert authed_http.connections == authed_http.http.connections
94+
95+
authed_http.connections = mock.sentinel.connections
96+
assert authed_http.http.connections == mock.sentinel.connections
97+
8998
def test_request_no_refresh(self):
9099
mock_credentials = mock.Mock(wraps=MockCredentials())
91100
mock_response = MockResponse()

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.