diff --git a/google/cloud/automl_v1beta1/services/tables/tables_client.py b/google/cloud/automl_v1beta1/services/tables/tables_client.py index f6e7889f..0fee7820 100644 --- a/google/cloud/automl_v1beta1/services/tables/tables_client.py +++ b/google/cloud/automl_v1beta1/services/tables/tables_client.py @@ -19,7 +19,6 @@ import copy import logging import pkg_resources -import six from google.api_core.gapic_v1 import client_info @@ -63,9 +62,9 @@ def to_proto_value(value): # This check needs to happen before isinstance(value, int), # isinstance(value, int) returns True when value is bool. return struct_pb2.Value(bool_value=value), None - elif isinstance(value, six.integer_types) or isinstance(value, float): + elif isinstance(value, int) or isinstance(value, float): return struct_pb2.Value(number_value=value), None - elif isinstance(value, six.string_types) or isinstance(value, six.text_type): + elif isinstance(value, str): return struct_pb2.Value(string_value=value), None elif isinstance(value, dict): struct_value = struct_pb2.Struct() diff --git a/tests/unit/test_tables_client_v1beta1.py b/tests/unit/test_tables_client_v1beta1.py index 4df06d48..e420c167 100644 --- a/tests/unit/test_tables_client_v1beta1.py +++ b/tests/unit/test_tables_client_v1beta1.py @@ -1714,12 +1714,15 @@ def test_prediction_client_credentials(self): assert prediction_client_kwargs["credentials"] == credentials_mock def test_prediction_client_client_info(self): + credentials_mock = mock.Mock() client_info_mock = mock.Mock() patch_prediction_client = mock.patch( "google.cloud.automl_v1beta1.services.tables.tables_client.PredictionServiceClient" ) with patch_prediction_client as MockPredictionClient: - automl_v1beta1.TablesClient(client_info=client_info_mock) + automl_v1beta1.TablesClient( + credentials=credentials_mock, client_info=client_info_mock, + ) _, prediction_client_kwargs = MockPredictionClient.call_args assert "client_info" in prediction_client_kwargs assert prediction_client_kwargs["client_info"] == client_info_mock