@@ -31,9 +31,9 @@ def test_constructor(self):
3131 http = object ()
3232 credentials = _Credentials ()
3333 client = self ._make_one (credentials = credentials , http = http )
34- self .assertIsInstance (client .connection , Connection )
35- self .assertEqual (client .connection ._credentials , credentials )
36- self .assertEqual (client .connection ._http , http )
34+ self .assertIsInstance (client ._connection , Connection )
35+ self .assertEqual (client ._connection ._credentials , credentials )
36+ self .assertEqual (client ._connection ._http , http )
3737
3838 def test_new_project_factory (self ):
3939 from google .cloud .resource_manager .project import Project
@@ -69,7 +69,7 @@ def test_fetch_project(self):
6969 credentials = _Credentials ()
7070 client = self ._make_one (credentials = credentials )
7171 # Patch the connection with one we can easily control.
72- client .connection = _Connection (project_resource )
72+ client ._connection = _Connection (project_resource )
7373
7474 project = client .fetch_project (project_id )
7575 self .assertIsInstance (project , Project )
@@ -84,7 +84,7 @@ def test_list_projects_return_type(self):
8484 credentials = _Credentials ()
8585 client = self ._make_one (credentials = credentials )
8686 # Patch the connection with one we can easily control.
87- client .connection = _Connection ({})
87+ client ._connection = _Connection ({})
8888
8989 results = client .list_projects ()
9090 self .assertIsInstance (results , HTTPIterator )
@@ -106,7 +106,7 @@ def test_list_projects_no_paging(self):
106106 ],
107107 }
108108 # Patch the connection with one we can easily control.
109- client .connection = _Connection (PROJECTS_RESOURCE )
109+ client ._connection = _Connection (PROJECTS_RESOURCE )
110110 # Make sure there will be no paging.
111111 self .assertFalse ('nextPageToken' in PROJECTS_RESOURCE )
112112
@@ -147,8 +147,8 @@ def test_list_projects_with_paging(self):
147147 ],
148148 }
149149 # Patch the connection with one we can easily control.
150- client .connection = _Connection (FIRST_PROJECTS_RESOURCE ,
151- SECOND_PROJECTS_RESOURCE )
150+ client ._connection = _Connection (FIRST_PROJECTS_RESOURCE ,
151+ SECOND_PROJECTS_RESOURCE )
152152
153153 # Page size = 1 with two response means we'll have two requests.
154154 results = list (client .list_projects (page_size = 1 ))
@@ -163,7 +163,7 @@ def test_list_projects_with_paging(self):
163163 self .assertEqual (project2 .status , STATUS )
164164
165165 # Check that two requests were required since page_size=1.
166- request1 , request2 = client .connection ._requested
166+ request1 , request2 = client ._connection ._requested
167167 self .assertEqual (request1 , {
168168 'path' : '/projects' ,
169169 'method' : 'GET' ,
@@ -197,7 +197,7 @@ def test_list_projects_with_filter(self):
197197 ],
198198 }
199199 # Patch the connection with one we can easily control.
200- client .connection = _Connection (PROJECTS_RESOURCE )
200+ client ._connection = _Connection (PROJECTS_RESOURCE )
201201
202202 FILTER_PARAMS = {'id' : 'project-id' }
203203 results = list (client .list_projects (filter_params = FILTER_PARAMS ))
@@ -208,7 +208,7 @@ def test_list_projects_with_filter(self):
208208 self .assertEqual (project .status , STATUS )
209209
210210 # Check that the filter made it in the request.
211- request , = client .connection ._requested
211+ request , = client ._connection ._requested
212212 self .assertEqual (request , {
213213 'path' : '/projects' ,
214214 'method' : 'GET' ,
0 commit comments