|
13 | 13 | # See the License for the specific language governing permissions and |
14 | 14 | # limitations under the License. |
15 | 15 | # |
16 | | -import asyncio |
17 | | -import json |
18 | | -import math |
19 | 16 | import os |
20 | | -from collections.abc import AsyncIterable, Iterable, Mapping, Sequence |
| 17 | +import asyncio |
21 | 18 | from unittest import mock |
22 | 19 | from unittest.mock import AsyncMock |
23 | 20 |
|
24 | 21 | import grpc |
| 22 | +from grpc.experimental import aio |
| 23 | +from collections.abc import Iterable, AsyncIterable |
| 24 | +from google.protobuf import json_format |
| 25 | +import json |
| 26 | +import math |
25 | 27 | import pytest |
| 28 | +from collections.abc import Sequence, Mapping |
26 | 29 | from google.api_core import api_core_version |
27 | | -from google.protobuf import json_format |
28 | | -from grpc.experimental import aio |
29 | | -from proto.marshal.rules import wrappers |
30 | 30 | from proto.marshal.rules.dates import DurationRule, TimestampRule |
31 | | -from requests import PreparedRequest, Request, Response |
| 31 | +from proto.marshal.rules import wrappers |
| 32 | +from requests import Response |
| 33 | +from requests import Request, PreparedRequest |
32 | 34 | from requests.sessions import Session |
| 35 | +from google.protobuf import json_format |
33 | 36 |
|
34 | 37 | try: |
35 | 38 | from google.auth.aio import credentials as ga_credentials_async |
36 | 39 | HAS_GOOGLE_AUTH_AIO = True |
37 | 40 | except ImportError: # pragma: NO COVER |
38 | 41 | HAS_GOOGLE_AUTH_AIO = False |
39 | 42 |
|
40 | | -import google.api_core.operation_async as operation_async # type: ignore |
41 | | -import google.auth |
42 | | -import google.protobuf.duration_pb2 as duration_pb2 # type: ignore |
43 | | -import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore |
44 | | -import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore |
45 | | -import google.rpc.code_pb2 as code_pb2 # type: ignore |
46 | | -from google.api_core import ( |
47 | | - client_options, |
48 | | - future, |
49 | | - gapic_v1, |
50 | | - grpc_helpers, |
51 | | - grpc_helpers_async, |
52 | | - operation, |
53 | | - operations_v1, |
54 | | - path_template, |
55 | | -) |
| 43 | +from google.api_core import client_options |
56 | 44 | from google.api_core import exceptions as core_exceptions |
| 45 | +from google.api_core import future |
| 46 | +from google.api_core import gapic_v1 |
| 47 | +from google.api_core import grpc_helpers |
| 48 | +from google.api_core import grpc_helpers_async |
| 49 | +from google.api_core import operation |
| 50 | +from google.api_core import operations_v1 |
| 51 | +from google.api_core import path_template |
57 | 52 | from google.api_core import retry as retries |
58 | 53 | from google.auth import credentials as ga_credentials |
59 | 54 | from google.auth.exceptions import MutualTLSChannelError |
60 | | -from google.cloud.eventarc_v1.services.eventarc import ( |
61 | | - EventarcAsyncClient, |
62 | | - EventarcClient, |
63 | | - pagers, |
64 | | - transports, |
65 | | -) |
66 | | -from google.cloud.eventarc_v1.types import ( |
67 | | - channel, |
68 | | - channel_connection, |
69 | | - discovery, |
70 | | - enrollment, |
71 | | - eventarc, |
72 | | - google_api_source, |
73 | | - google_channel_config, |
74 | | - logging_config, |
75 | | - message_bus, |
76 | | - network_config, |
77 | | - pipeline, |
78 | | - trigger, |
79 | | -) |
| 55 | +from google.cloud.eventarc_v1.services.eventarc import EventarcAsyncClient |
| 56 | +from google.cloud.eventarc_v1.services.eventarc import EventarcClient |
| 57 | +from google.cloud.eventarc_v1.services.eventarc import pagers |
| 58 | +from google.cloud.eventarc_v1.services.eventarc import transports |
| 59 | +from google.cloud.eventarc_v1.types import channel |
80 | 60 | from google.cloud.eventarc_v1.types import channel as gce_channel |
| 61 | +from google.cloud.eventarc_v1.types import channel_connection |
81 | 62 | from google.cloud.eventarc_v1.types import channel_connection as gce_channel_connection |
| 63 | +from google.cloud.eventarc_v1.types import discovery |
| 64 | +from google.cloud.eventarc_v1.types import enrollment |
82 | 65 | from google.cloud.eventarc_v1.types import enrollment as gce_enrollment |
| 66 | +from google.cloud.eventarc_v1.types import eventarc |
| 67 | +from google.cloud.eventarc_v1.types import google_api_source |
83 | 68 | from google.cloud.eventarc_v1.types import google_api_source as gce_google_api_source |
84 | | -from google.cloud.eventarc_v1.types import ( |
85 | | - google_channel_config as gce_google_channel_config, |
86 | | -) |
| 69 | +from google.cloud.eventarc_v1.types import google_channel_config |
| 70 | +from google.cloud.eventarc_v1.types import google_channel_config as gce_google_channel_config |
| 71 | +from google.cloud.eventarc_v1.types import logging_config |
| 72 | +from google.cloud.eventarc_v1.types import message_bus |
87 | 73 | from google.cloud.eventarc_v1.types import message_bus as gce_message_bus |
| 74 | +from google.cloud.eventarc_v1.types import network_config |
| 75 | +from google.cloud.eventarc_v1.types import pipeline |
88 | 76 | from google.cloud.eventarc_v1.types import pipeline as gce_pipeline |
| 77 | +from google.cloud.eventarc_v1.types import trigger |
89 | 78 | from google.cloud.eventarc_v1.types import trigger as gce_trigger |
90 | 79 | from google.cloud.location import locations_pb2 |
91 | | -from google.iam.v1 import ( |
92 | | - iam_policy_pb2, # type: ignore |
93 | | - options_pb2, # type: ignore |
94 | | - policy_pb2, # type: ignore |
95 | | -) |
96 | | -from google.longrunning import operations_pb2 # type: ignore |
| 80 | +from google.iam.v1 import iam_policy_pb2 # type: ignore |
| 81 | +from google.iam.v1 import options_pb2 # type: ignore |
| 82 | +from google.iam.v1 import policy_pb2 # type: ignore |
| 83 | +from google.longrunning import operations_pb2 # type: ignore |
97 | 84 | from google.oauth2 import service_account |
| 85 | +import google.api_core.operation_async as operation_async # type: ignore |
| 86 | +import google.auth |
| 87 | +import google.protobuf.duration_pb2 as duration_pb2 # type: ignore |
| 88 | +import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore |
| 89 | +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore |
| 90 | +import google.rpc.code_pb2 as code_pb2 # type: ignore |
| 91 | + |
| 92 | + |
98 | 93 |
|
99 | 94 | CRED_INFO_JSON = { |
100 | 95 | "credential_source": "/path/to/file", |
|
0 commit comments