Skip to content

Commit 6963bcb

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

File tree

6 files changed

+54
-12
lines changed

6 files changed

+54
-12
lines changed

packages/google-cloud-videointelligence/tests/unit/gapic/videointelligence_v1/test_video_intelligence_service.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 (
2028
future,
2129
gapic_v1,
@@ -36,7 +44,6 @@
3644
from google.protobuf import duration_pb2 # type: ignore
3745
import grpc
3846
from grpc.experimental import aio
39-
import mock
4047
from proto.marshal.rules.dates import DurationRule, TimestampRule
4148
import pytest
4249

packages/google-cloud-videointelligence/tests/unit/gapic/videointelligence_v1beta2/test_video_intelligence_service.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 (
2028
future,
2129
gapic_v1,
@@ -36,7 +44,6 @@
3644
from google.protobuf import duration_pb2 # type: ignore
3745
import grpc
3846
from grpc.experimental import aio
39-
import mock
4047
from proto.marshal.rules.dates import DurationRule, TimestampRule
4148
import pytest
4249

packages/google-cloud-videointelligence/tests/unit/gapic/videointelligence_v1p1beta1/test_video_intelligence_service.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 (
2028
future,
2129
gapic_v1,
@@ -36,7 +44,6 @@
3644
from google.protobuf import duration_pb2 # type: ignore
3745
import grpc
3846
from grpc.experimental import aio
39-
import mock
4047
from proto.marshal.rules.dates import DurationRule, TimestampRule
4148
import pytest
4249

packages/google-cloud-videointelligence/tests/unit/gapic/videointelligence_v1p2beta1/test_video_intelligence_service.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 (
2028
future,
2129
gapic_v1,
@@ -36,7 +44,6 @@
3644
from google.protobuf import duration_pb2 # type: ignore
3745
import grpc
3846
from grpc.experimental import aio
39-
import mock
4047
from proto.marshal.rules.dates import DurationRule, TimestampRule
4148
import pytest
4249

packages/google-cloud-videointelligence/tests/unit/gapic/videointelligence_v1p3beta1/test_streaming_video_intelligence_service.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
@@ -26,7 +34,6 @@
2634
from google.rpc import status_pb2 # type: ignore
2735
import grpc
2836
from grpc.experimental import aio
29-
import mock
3037
from proto.marshal.rules.dates import DurationRule, TimestampRule
3138
import pytest
3239

packages/google-cloud-videointelligence/tests/unit/gapic/videointelligence_v1p3beta1/test_video_intelligence_service.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 (
2028
future,
2129
gapic_v1,
@@ -36,7 +44,6 @@
3644
from google.protobuf import duration_pb2 # type: ignore
3745
import grpc
3846
from grpc.experimental import aio
39-
import mock
4047
from proto.marshal.rules.dates import DurationRule, TimestampRule
4148
import pytest
4249

0 commit comments

Comments
 (0)