File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -232,14 +232,14 @@ def test_mtls(self):
232
232
def test_duplicate_user_agent (self ):
233
233
# Regression test for issue #565
234
234
from google .cloud ._http import ClientInfo
235
- from google .cloud .storage .client import Client
236
235
from google .cloud .storage .batch import Batch
237
236
from google .cloud .storage import __version__
238
237
239
238
client_info = ClientInfo (user_agent = "test/123" )
240
- client = Client (project = "test-project" , client_info = client_info )
241
- conn = self ._make_one (client , client_info )
239
+ conn = self ._make_one (object (), client_info = client_info )
242
240
expected_user_agent = "test/123 gcloud-python/{} " .format (__version__ )
243
241
self .assertEqual (conn ._client_info .user_agent , expected_user_agent )
242
+
243
+ client = mock .Mock (_connection = conn , spec = ["_connection" ])
244
244
batch = Batch (client )
245
245
self .assertEqual (batch ._client_info .user_agent , expected_user_agent )
You can’t perform that action at this time.
0 commit comments