Skip to content

Commit 0a4c1b0

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

File tree

3 files changed

+27
-6
lines changed

3 files changed

+27
-6
lines changed

packages/google-cloud-documentai/tests/unit/gapic/documentai_v1/test_document_processor_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,
@@ -45,7 +53,6 @@
4553
from google.type import postal_address_pb2 # type: ignore
4654
import grpc
4755
from grpc.experimental import aio
48-
import mock
4956
from proto.marshal.rules.dates import DurationRule, TimestampRule
5057
import pytest
5158

packages/google-cloud-documentai/tests/unit/gapic/documentai_v1beta2/test_document_understanding_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.rpc import status_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-documentai/tests/unit/gapic/documentai_v1beta3/test_document_processor_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,
@@ -45,7 +53,6 @@
4553
from google.type import postal_address_pb2 # type: ignore
4654
import grpc
4755
from grpc.experimental import aio
48-
import mock
4956
from proto.marshal.rules.dates import DurationRule, TimestampRule
5057
import pytest
5158

0 commit comments

Comments
 (0)