Skip to content

Commit d13bfc4

Browse files
chore: use gapic-generator-python 1.0.0 (#383)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 451250442 Source-Link: googleapis/googleapis@cca5e81 Source-Link: googleapis/googleapis-gen@0b219da Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMGIyMTlkYTE2MWE4YmRjYzNjNmY3YjJlZmNkODIxMDUxODJhMzBjYSJ9
1 parent 2ac38e0 commit d13bfc4

File tree

6 files changed

+54
-12
lines changed

6 files changed

+54
-12
lines changed

packages/google-cloud-datacatalog/tests/unit/gapic/datacatalog_v1/test_data_catalog.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,17 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
import math
1716
import os
1817

18+
# try/except added for compatibility with python < 3.8
19+
try:
20+
from unittest import mock
21+
from unittest.mock import AsyncMock
22+
except ImportError:
23+
import mock
24+
25+
import math
26+
1927
from google.api_core import gapic_v1, grpc_helpers, grpc_helpers_async, path_template
2028
from google.api_core import client_options
2129
from google.api_core import exceptions as core_exceptions
@@ -31,7 +39,6 @@
3139
from google.type import expr_pb2 # type: ignore
3240
import grpc
3341
from grpc.experimental import aio
34-
import mock
3542
from proto.marshal.rules.dates import DurationRule, TimestampRule
3643
import pytest
3744

packages/google-cloud-datacatalog/tests/unit/gapic/datacatalog_v1/test_policy_tag_manager.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,17 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
import math
1716
import os
1817

18+
# try/except added for compatibility with python < 3.8
19+
try:
20+
from unittest import mock
21+
from unittest.mock import AsyncMock
22+
except ImportError:
23+
import mock
24+
25+
import math
26+
1927
from google.api_core import gapic_v1, grpc_helpers, grpc_helpers_async, path_template
2028
from google.api_core import client_options
2129
from google.api_core import exceptions as core_exceptions
@@ -31,7 +39,6 @@
3139
from google.type import expr_pb2 # type: ignore
3240
import grpc
3341
from grpc.experimental import aio
34-
import mock
3542
from proto.marshal.rules.dates import DurationRule, TimestampRule
3643
import pytest
3744

packages/google-cloud-datacatalog/tests/unit/gapic/datacatalog_v1/test_policy_tag_manager_serialization.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,17 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
import math
1716
import os
1817

18+
# try/except added for compatibility with python < 3.8
19+
try:
20+
from unittest import mock
21+
from unittest.mock import AsyncMock
22+
except ImportError:
23+
import mock
24+
25+
import math
26+
1927
from google.api_core import gapic_v1, grpc_helpers, grpc_helpers_async, path_template
2028
from google.api_core import client_options
2129
from google.api_core import exceptions as core_exceptions
@@ -25,7 +33,6 @@
2533
from google.oauth2 import service_account
2634
import grpc
2735
from grpc.experimental import aio
28-
import mock
2936
from proto.marshal.rules.dates import DurationRule, TimestampRule
3037
import pytest
3138

packages/google-cloud-datacatalog/tests/unit/gapic/datacatalog_v1beta1/test_data_catalog.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,17 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
import math
1716
import os
1817

18+
# try/except added for compatibility with python < 3.8
19+
try:
20+
from unittest import mock
21+
from unittest.mock import AsyncMock
22+
except ImportError:
23+
import mock
24+
25+
import math
26+
1927
from google.api_core import gapic_v1, grpc_helpers, grpc_helpers_async, path_template
2028
from google.api_core import client_options
2129
from google.api_core import exceptions as core_exceptions
@@ -31,7 +39,6 @@
3139
from google.type import expr_pb2 # type: ignore
3240
import grpc
3341
from grpc.experimental import aio
34-
import mock
3542
from proto.marshal.rules.dates import DurationRule, TimestampRule
3643
import pytest
3744

packages/google-cloud-datacatalog/tests/unit/gapic/datacatalog_v1beta1/test_policy_tag_manager.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,17 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
import math
1716
import os
1817

18+
# try/except added for compatibility with python < 3.8
19+
try:
20+
from unittest import mock
21+
from unittest.mock import AsyncMock
22+
except ImportError:
23+
import mock
24+
25+
import math
26+
1927
from google.api_core import gapic_v1, grpc_helpers, grpc_helpers_async, path_template
2028
from google.api_core import client_options
2129
from google.api_core import exceptions as core_exceptions
@@ -30,7 +38,6 @@
3038
from google.type import expr_pb2 # type: ignore
3139
import grpc
3240
from grpc.experimental import aio
33-
import mock
3441
from proto.marshal.rules.dates import DurationRule, TimestampRule
3542
import pytest
3643

packages/google-cloud-datacatalog/tests/unit/gapic/datacatalog_v1beta1/test_policy_tag_manager_serialization.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,17 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
import math
1716
import os
1817

18+
# try/except added for compatibility with python < 3.8
19+
try:
20+
from unittest import mock
21+
from unittest.mock import AsyncMock
22+
except ImportError:
23+
import mock
24+
25+
import math
26+
1927
from google.api_core import gapic_v1, grpc_helpers, grpc_helpers_async, path_template
2028
from google.api_core import client_options
2129
from google.api_core import exceptions as core_exceptions
@@ -25,7 +33,6 @@
2533
from google.oauth2 import service_account
2634
import grpc
2735
from grpc.experimental import aio
28-
import mock
2936
from proto.marshal.rules.dates import DurationRule, TimestampRule
3037
import pytest
3138

0 commit comments

Comments
 (0)