diff --git a/.coveragerc b/.coveragerc index 9ba3d3fe6..4192b8cf8 100644 --- a/.coveragerc +++ b/.coveragerc @@ -6,6 +6,8 @@ omit = */samples/* */conftest.py */google-cloud-sdk/lib/* + # NOTE: Temporarily disabling coverage for `_requests_base.py`. + */_requests_base.py exclude_lines = # Re-enable the standard pragma pragma: NO COVER diff --git a/google/auth/transport/_requests_base.py b/google/auth/transport/_requests_base.py index ec718d909..0608223d8 100644 --- a/google/auth/transport/_requests_base.py +++ b/google/auth/transport/_requests_base.py @@ -13,7 +13,8 @@ # limitations under the License. """Transport adapter for Base Requests.""" - +# NOTE: The coverage for this file is temporarily disabled in `.coveragerc` +# since it is currently unused. import abc diff --git a/google/auth/transport/requests.py b/google/auth/transport/requests.py index 68f67c59b..23a69783d 100644 --- a/google/auth/transport/requests.py +++ b/google/auth/transport/requests.py @@ -38,7 +38,6 @@ from google.auth import exceptions from google.auth import transport import google.auth.transport._mtls_helper -from google.auth.transport._requests_base import _BaseAuthorizedSession from google.oauth2 import service_account _LOGGER = logging.getLogger(__name__) @@ -293,7 +292,7 @@ def proxy_manager_for(self, *args, **kwargs): return super(_MutualTlsOffloadAdapter, self).proxy_manager_for(*args, **kwargs) -class AuthorizedSession(requests.Session, _BaseAuthorizedSession): +class AuthorizedSession(requests.Session): """A Requests Session class with credentials. This class is used to perform requests to API endpoints that require @@ -390,7 +389,7 @@ def __init__( default_host=None, ): super(AuthorizedSession, self).__init__() - _BaseAuthorizedSession.__init__(self, credentials) + self.credentials = credentials self._refresh_status_codes = refresh_status_codes self._max_refresh_attempts = max_refresh_attempts self._refresh_timeout = refresh_timeout diff --git a/system_tests/secrets.tar.enc b/system_tests/secrets.tar.enc index 2d3f631e9..d0d4ce702 100644 Binary files a/system_tests/secrets.tar.enc and b/system_tests/secrets.tar.enc differ