@@ -60,18 +60,18 @@ def mock_get_credentials():
6060 with _Monkey (client , get_credentials = mock_get_credentials ):
6161 client_obj = self ._make_one ()
6262
63- self .assertIsInstance (client_obj .connection , _MockConnection )
64- self .assertIs (client_obj .connection .credentials , CREDENTIALS )
63+ self .assertIsInstance (client_obj ._connection , _MockConnection )
64+ self .assertIs (client_obj ._connection .credentials , CREDENTIALS )
6565 self .assertEqual (FUNC_CALLS , ['get_credentials' ])
6666
6767 def test_ctor_explicit (self ):
6868 CREDENTIALS = object ()
6969 HTTP = object ()
7070 client_obj = self ._make_one (credentials = CREDENTIALS , http = HTTP )
7171
72- self .assertIsInstance (client_obj .connection , _MockConnection )
73- self .assertIs (client_obj .connection .credentials , CREDENTIALS )
74- self .assertIs (client_obj .connection .http , HTTP )
72+ self .assertIsInstance (client_obj ._connection , _MockConnection )
73+ self .assertIs (client_obj ._connection .credentials , CREDENTIALS )
74+ self .assertIs (client_obj ._connection .http , HTTP )
7575
7676 def test_from_service_account_json (self ):
7777 from google .cloud ._testing import _Monkey
@@ -83,7 +83,7 @@ def test_from_service_account_json(self):
8383 with _Monkey (client , ServiceAccountCredentials = mock_creds ):
8484 client_obj = KLASS .from_service_account_json (MOCK_FILENAME )
8585
86- self .assertIs (client_obj .connection .credentials , mock_creds ._result )
86+ self .assertIs (client_obj ._connection .credentials , mock_creds ._result )
8787 self .assertEqual (mock_creds .json_called , [MOCK_FILENAME ])
8888
8989 def test_from_service_account_json_fail (self ):
@@ -104,7 +104,7 @@ def test_from_service_account_p12(self):
104104 client_obj = KLASS .from_service_account_p12 (CLIENT_EMAIL ,
105105 MOCK_FILENAME )
106106
107- self .assertIs (client_obj .connection .credentials , mock_creds ._result )
107+ self .assertIs (client_obj ._connection .credentials , mock_creds ._result )
108108 self .assertEqual (mock_creds .p12_called ,
109109 [(CLIENT_EMAIL , MOCK_FILENAME )])
110110
@@ -155,8 +155,8 @@ def mock_get_credentials():
155155 client_obj = self ._make_one ()
156156
157157 self .assertEqual (client_obj .project , PROJECT )
158- self .assertIsInstance (client_obj .connection , _MockConnection )
159- self .assertIs (client_obj .connection .credentials , CREDENTIALS )
158+ self .assertIsInstance (client_obj ._connection , _MockConnection )
159+ self .assertIs (client_obj ._connection .credentials , CREDENTIALS )
160160 self .assertEqual (
161161 FUNC_CALLS ,
162162 [(None , '_determine_default_project' ), 'get_credentials' ])
@@ -196,9 +196,9 @@ def _explicit_ctor_helper(self, project):
196196 self .assertEqual (client_obj .project , project .decode ('utf-8' ))
197197 else :
198198 self .assertEqual (client_obj .project , project )
199- self .assertIsInstance (client_obj .connection , _MockConnection )
200- self .assertIs (client_obj .connection .credentials , CREDENTIALS )
201- self .assertIs (client_obj .connection .http , HTTP )
199+ self .assertIsInstance (client_obj ._connection , _MockConnection )
200+ self .assertIs (client_obj ._connection .credentials , CREDENTIALS )
201+ self .assertIs (client_obj ._connection .http , HTTP )
202202
203203 def test_ctor_explicit_bytes (self ):
204204 PROJECT = b'PROJECT'
0 commit comments