|
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.auth |
41 | | -import google.protobuf.duration_pb2 as duration_pb2 # type: ignore |
42 | | -import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore |
43 | | -from google.api_core import ( |
44 | | - client_options, |
45 | | - gapic_v1, |
46 | | - grpc_helpers, |
47 | | - grpc_helpers_async, |
48 | | - path_template, |
49 | | -) |
| 43 | +from google.api_core import client_options |
50 | 44 | from google.api_core import exceptions as core_exceptions |
| 45 | +from google.api_core import gapic_v1 |
| 46 | +from google.api_core import grpc_helpers |
| 47 | +from google.api_core import grpc_helpers_async |
| 48 | +from google.api_core import path_template |
51 | 49 | from google.api_core import retry as retries |
52 | 50 | from google.auth import credentials as ga_credentials |
53 | 51 | from google.auth.exceptions import MutualTLSChannelError |
54 | | -from google.iam.credentials_v1.services.iam_credentials import ( |
55 | | - IAMCredentialsAsyncClient, |
56 | | - IAMCredentialsClient, |
57 | | - transports, |
58 | | -) |
| 52 | +from google.iam.credentials_v1.services.iam_credentials import IAMCredentialsAsyncClient |
| 53 | +from google.iam.credentials_v1.services.iam_credentials import IAMCredentialsClient |
| 54 | +from google.iam.credentials_v1.services.iam_credentials import transports |
59 | 55 | from google.iam.credentials_v1.types import common |
60 | 56 | from google.oauth2 import service_account |
| 57 | +import google.auth |
| 58 | +import google.protobuf.duration_pb2 as duration_pb2 # type: ignore |
| 59 | +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore |
| 60 | + |
| 61 | + |
61 | 62 |
|
62 | 63 | CRED_INFO_JSON = { |
63 | 64 | "credential_source": "/path/to/file", |
|
0 commit comments