File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
google/cloud/automl_v1beta1/tables Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -104,17 +104,18 @@ def __init__(
104104 else :
105105 client_info_ .user_agent = user_agent
106106 client_info_ .gapic_version = version
107+ kwargs ["client_info" ] = client_info_
107108
108109 if client is None :
109110 self .auto_ml_client = gapic .auto_ml_client .AutoMlClient (
110- credentials = credentials , client_info = client_info_ , ** kwargs
111+ credentials = credentials , ** kwargs
111112 )
112113 else :
113114 self .auto_ml_client = client
114115
115116 if prediction_client is None :
116117 self .prediction_client = gapic .prediction_service_client .PredictionServiceClient (
117- credentials = credentials , client_info = client_info_ , ** kwargs
118+ credentials = credentials , ** kwargs
118119 )
119120 else :
120121 self .prediction_client = prediction_client
Original file line number Diff line number Diff line change @@ -1424,3 +1424,14 @@ def test_prediction_client_credentials(self):
14241424 _ , prediction_client_kwargs = MockPredictionClient .call_args
14251425 assert "credentials" in prediction_client_kwargs
14261426 assert prediction_client_kwargs ["credentials" ] == credentials_mock
1427+
1428+ def test_prediction_client_client_info (self ):
1429+ client_info_mock = mock .Mock ()
1430+ patch_prediction_client = mock .patch (
1431+ "google.cloud.automl_v1beta1.gapic.prediction_service_client.PredictionServiceClient"
1432+ )
1433+ with patch_prediction_client as MockPredictionClient :
1434+ client = automl_v1beta1 .TablesClient (client_info = client_info_mock )
1435+ _ , prediction_client_kwargs = MockPredictionClient .call_args
1436+ assert "client_info" in prediction_client_kwargs
1437+ assert prediction_client_kwargs ["client_info" ] == client_info_mock
You can’t perform that action at this time.
0 commit comments