@@ -39,7 +39,7 @@ def test_publisher_api_wo_gax(self):
3939 with _Monkey (MUT , _USE_GAX = False ):
4040 client = self ._make_one (project = self .PROJECT , credentials = creds )
4141
42- conn = client .connection = object ()
42+ conn = client ._connection = object ()
4343 api = client .publisher_api
4444
4545 self .assertIsInstance (api , _PublisherAPI )
@@ -93,7 +93,7 @@ def __init__(self, _wrapped, client):
9393 # API instance is cached
9494 again = client .publisher_api
9595 self .assertIs (again , api )
96- args = (client .connection ,)
96+ args = (client ._connection ,)
9797 self .assertEqual (_called_with , [(args , {})])
9898
9999 def test_subscriber_api_wo_gax (self ):
@@ -105,7 +105,7 @@ def test_subscriber_api_wo_gax(self):
105105 with _Monkey (MUT , _USE_GAX = False ):
106106 client = self ._make_one (project = self .PROJECT , credentials = creds )
107107
108- conn = client .connection = object ()
108+ conn = client ._connection = object ()
109109 api = client .subscriber_api
110110
111111 self .assertIsInstance (api , _SubscriberAPI )
@@ -145,14 +145,14 @@ def __init__(self, _wrapped, client):
145145 # API instance is cached
146146 again = client .subscriber_api
147147 self .assertIs (again , api )
148- args = (client .connection ,)
148+ args = (client ._connection ,)
149149 self .assertEqual (_called_with , [(args , {})])
150150
151151 def test_iam_policy_api (self ):
152152 from google .cloud .pubsub ._http import _IAMPolicyAPI
153153 creds = _Credentials ()
154154 client = self ._make_one (project = self .PROJECT , credentials = creds )
155- conn = client .connection = object ()
155+ conn = client ._connection = object ()
156156 api = client .iam_policy_api
157157 self .assertIsInstance (api , _IAMPolicyAPI )
158158 self .assertIs (api ._connection , conn )
@@ -165,7 +165,7 @@ def test_list_topics_no_paging(self):
165165
166166 creds = _Credentials ()
167167 client = self ._make_one (project = self .PROJECT , credentials = creds )
168- client .connection = object ()
168+ client ._connection = object ()
169169 api = _FauxPublisherAPI (items = [Topic (self .TOPIC_NAME , client )])
170170 client ._publisher_api = api
171171
@@ -188,7 +188,7 @@ def test_list_topics_with_paging(self):
188188 SIZE = 1
189189 creds = _Credentials ()
190190 client = self ._make_one (project = self .PROJECT , credentials = creds )
191- client .connection = object ()
191+ client ._connection = object ()
192192 api = _FauxPublisherAPI ([Topic (self .TOPIC_NAME , client )], TOKEN2 )
193193 client ._publisher_api = api
194194
@@ -206,7 +206,7 @@ def test_list_topics_with_paging(self):
206206 def test_list_topics_missing_key (self ):
207207 creds = _Credentials ()
208208 client = self ._make_one (project = self .PROJECT , credentials = creds )
209- client .connection = object ()
209+ client ._connection = object ()
210210 api = _FauxPublisherAPI ()
211211 client ._publisher_api = api
212212
@@ -228,7 +228,7 @@ def test_list_subscriptions_no_paging(self):
228228 client = self ._make_one (project = self .PROJECT , credentials = creds ,
229229 use_gax = False )
230230 returned = {'subscriptions' : [SUB_INFO ]}
231- client .connection = _Connection (returned )
231+ client ._connection = _Connection (returned )
232232
233233 iterator = client .list_subscriptions ()
234234 subscriptions = list (iterator )
@@ -248,7 +248,7 @@ def test_list_subscriptions_no_paging(self):
248248 self .assertIsNone (subscription .ack_deadline )
249249 self .assertIsNone (subscription .push_endpoint )
250250
251- called_with = client .connection ._called_with
251+ called_with = client ._connection ._called_with
252252 expected_path = '/projects/%s/subscriptions' % (self .PROJECT ,)
253253 self .assertEqual (called_with , {
254254 'method' : 'GET' ,
@@ -280,7 +280,7 @@ def test_list_subscriptions_with_paging(self):
280280 'subscriptions' : [SUB_INFO ],
281281 'nextPageToken' : TOKEN2 ,
282282 }
283- client .connection = _Connection (returned )
283+ client ._connection = _Connection (returned )
284284
285285 iterator = client .list_subscriptions (
286286 SIZE , TOKEN1 )
@@ -302,7 +302,7 @@ def test_list_subscriptions_with_paging(self):
302302 self .assertEqual (subscription .ack_deadline , ACK_DEADLINE )
303303 self .assertEqual (subscription .push_endpoint , PUSH_ENDPOINT )
304304
305- called_with = client .connection ._called_with
305+ called_with = client ._connection ._called_with
306306 expected_path = '/projects/%s/subscriptions' % (self .PROJECT ,)
307307 self .assertEqual (called_with , {
308308 'method' : 'GET' ,
@@ -318,7 +318,7 @@ def test_list_subscriptions_w_missing_key(self):
318318 creds = _Credentials ()
319319
320320 client = self ._make_one (project = PROJECT , credentials = creds )
321- client .connection = object ()
321+ client ._connection = object ()
322322 api = client ._subscriber_api = _FauxSubscriberAPI ()
323323 api ._list_subscriptions_response = (), None
324324
0 commit comments