Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.

Commit e30f8ca

Browse files
chore: use gapic-generator-python 1.0.0 (#140)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 451250442 Source-Link: googleapis/googleapis@cca5e81 Source-Link: https://github.com/googleapis/googleapis-gen/commit/0b219da161a8bdcc3c6f7b2efcd82105182a30ca Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMGIyMTlkYTE2MWE4YmRjYzNjNmY3YjJlZmNkODIxMDUxODJhMzBjYSJ9
1 parent 7ce03ad commit e30f8ca

File tree

3 files changed

+27
-6
lines changed

3 files changed

+27
-6
lines changed

tests/unit/gapic/servicecontrol_v1/test_quota_controller.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 import distribution_pb2 # type: ignore
2028
from google.api_core import gapic_v1, grpc_helpers, grpc_helpers_async, path_template
2129
from google.api_core import client_options
@@ -28,7 +36,6 @@
2836
from google.protobuf import timestamp_pb2 # type: ignore
2937
import grpc
3038
from grpc.experimental import aio
31-
import mock
3239
from proto.marshal.rules.dates import DurationRule, TimestampRule
3340
import pytest
3441

tests/unit/gapic/servicecontrol_v1/test_service_controller.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 import distribution_pb2 # type: ignore
2028
from google.api_core import gapic_v1, grpc_helpers, grpc_helpers_async, path_template
2129
from google.api_core import client_options
@@ -31,7 +39,6 @@
3139
from google.protobuf import timestamp_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

tests/unit/gapic/servicecontrol_v2/test_service_controller.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.rpc.context import attribute_context_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

0 commit comments

Comments
 (0)