Skip to content

Commit 908faf5

Browse files
committed
chore(gapic): update goldens to match generator output
1 parent 926a96f commit 908faf5

10 files changed

Lines changed: 283 additions & 294 deletions

File tree

packages/gapic-generator/tests/integration/goldens/asset/tests/unit/gapic/asset_v1/test_asset_service.py

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -13,60 +13,62 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
import asyncio
17-
import json
18-
import math
1916
import os
20-
from collections.abc import AsyncIterable, Iterable, Mapping, Sequence
17+
import asyncio
2118
from unittest import mock
2219
from unittest.mock import AsyncMock
2320

2421
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
2527
import pytest
28+
from collections.abc import Sequence, Mapping
2629
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
3030
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
3234
from requests.sessions import Session
35+
from google.protobuf import json_format
3336

3437
try:
3538
from google.auth.aio import credentials as ga_credentials_async
3639
HAS_GOOGLE_AUTH_AIO = True
3740
except ImportError: # pragma: NO COVER
3841
HAS_GOOGLE_AUTH_AIO = False
3942

43+
from google.api_core import client_options
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
52+
from google.api_core import retry as retries
53+
from google.auth import credentials as ga_credentials
54+
from google.auth.exceptions import MutualTLSChannelError
55+
from google.cloud.asset_v1.services.asset_service import AssetServiceAsyncClient
56+
from google.cloud.asset_v1.services.asset_service import AssetServiceClient
57+
from google.cloud.asset_v1.services.asset_service import pagers
58+
from google.cloud.asset_v1.services.asset_service import transports
59+
from google.cloud.asset_v1.types import asset_service
60+
from google.cloud.asset_v1.types import assets
61+
from google.longrunning import operations_pb2 # type: ignore
62+
from google.oauth2 import service_account
4063
import google.api_core.operation_async as operation_async # type: ignore
4164
import google.auth
4265
import google.protobuf.duration_pb2 as duration_pb2 # type: ignore
4366
import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore
4467
import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
4568
import google.rpc.status_pb2 as status_pb2 # type: ignore
4669
import google.type.expr_pb2 as expr_pb2 # type: ignore
47-
from google.api_core import (
48-
client_options,
49-
future,
50-
gapic_v1,
51-
grpc_helpers,
52-
grpc_helpers_async,
53-
operation,
54-
operations_v1,
55-
path_template,
56-
)
57-
from google.api_core import exceptions as core_exceptions
58-
from google.api_core import retry as retries
59-
from google.auth import credentials as ga_credentials
60-
from google.auth.exceptions import MutualTLSChannelError
61-
from google.cloud.asset_v1.services.asset_service import (
62-
AssetServiceAsyncClient,
63-
AssetServiceClient,
64-
pagers,
65-
transports,
66-
)
67-
from google.cloud.asset_v1.types import asset_service, assets
68-
from google.longrunning import operations_pb2 # type: ignore
69-
from google.oauth2 import service_account
70+
71+
7072

7173
CRED_INFO_JSON = {
7274
"credential_source": "/path/to/file",

packages/gapic-generator/tests/integration/goldens/logging/tests/unit/gapic/logging_v2/test_config_service_v2.py

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,55 +13,53 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
import asyncio
17-
import json
18-
import math
1916
import os
20-
from collections.abc import Mapping, Sequence
17+
import asyncio
2118
from unittest import mock
2219
from unittest.mock import AsyncMock
2320

2421
import grpc
22+
from grpc.experimental import aio
23+
import json
24+
import math
2525
import pytest
26+
from collections.abc import Sequence, Mapping
2627
from google.api_core import api_core_version
27-
from grpc.experimental import aio
28-
from proto.marshal.rules import wrappers
2928
from proto.marshal.rules.dates import DurationRule, TimestampRule
29+
from proto.marshal.rules import wrappers
3030

3131
try:
3232
from google.auth.aio import credentials as ga_credentials_async
3333
HAS_GOOGLE_AUTH_AIO = True
3434
except ImportError: # pragma: NO COVER
3535
HAS_GOOGLE_AUTH_AIO = False
3636

37-
import google.api_core.operation_async as operation_async # type: ignore
38-
import google.auth
39-
import google.protobuf.empty_pb2 as empty_pb2 # type: ignore
40-
import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore
41-
import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
42-
from google.api_core import (
43-
client_options,
44-
future,
45-
gapic_v1,
46-
grpc_helpers,
47-
grpc_helpers_async,
48-
operation,
49-
operations_v1,
50-
path_template,
51-
)
37+
from google.api_core import client_options
5238
from google.api_core import exceptions as core_exceptions
39+
from google.api_core import future
40+
from google.api_core import gapic_v1
41+
from google.api_core import grpc_helpers
42+
from google.api_core import grpc_helpers_async
43+
from google.api_core import operation
44+
from google.api_core import operations_v1
45+
from google.api_core import path_template
5346
from google.api_core import retry as retries
5447
from google.auth import credentials as ga_credentials
5548
from google.auth.exceptions import MutualTLSChannelError
56-
from google.cloud.logging_v2.services.config_service_v2 import (
57-
ConfigServiceV2AsyncClient,
58-
ConfigServiceV2Client,
59-
pagers,
60-
transports,
61-
)
49+
from google.cloud.logging_v2.services.config_service_v2 import ConfigServiceV2AsyncClient
50+
from google.cloud.logging_v2.services.config_service_v2 import ConfigServiceV2Client
51+
from google.cloud.logging_v2.services.config_service_v2 import pagers
52+
from google.cloud.logging_v2.services.config_service_v2 import transports
6253
from google.cloud.logging_v2.types import logging_config
63-
from google.longrunning import operations_pb2 # type: ignore
54+
from google.longrunning import operations_pb2 # type: ignore
6455
from google.oauth2 import service_account
56+
import google.api_core.operation_async as operation_async # type: ignore
57+
import google.auth
58+
import google.protobuf.empty_pb2 as empty_pb2 # type: ignore
59+
import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore
60+
import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
61+
62+
6563

6664
CRED_INFO_JSON = {
6765
"credential_source": "/path/to/file",

packages/gapic-generator/tests/integration/goldens/logging/tests/unit/gapic/logging_v2/test_logging_service_v2.py

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,44 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
import asyncio
17-
import json
18-
import math
1916
import os
20-
from collections.abc import Mapping, Sequence
17+
import asyncio
2118
from unittest import mock
2219
from unittest.mock import AsyncMock
2320

2421
import grpc
22+
from grpc.experimental import aio
23+
import json
24+
import math
2525
import pytest
26+
from collections.abc import Sequence, Mapping
2627
from google.api_core import api_core_version
27-
from grpc.experimental import aio
28-
from proto.marshal.rules import wrappers
2928
from proto.marshal.rules.dates import DurationRule, TimestampRule
29+
from proto.marshal.rules import wrappers
3030

3131
try:
3232
from google.auth.aio import credentials as ga_credentials_async
3333
HAS_GOOGLE_AUTH_AIO = True
3434
except ImportError: # pragma: NO COVER
3535
HAS_GOOGLE_AUTH_AIO = False
3636

37+
from google.api_core import client_options
38+
from google.api_core import exceptions as core_exceptions
39+
from google.api_core import gapic_v1
40+
from google.api_core import grpc_helpers
41+
from google.api_core import grpc_helpers_async
42+
from google.api_core import path_template
43+
from google.api_core import retry as retries
44+
from google.auth import credentials as ga_credentials
45+
from google.auth.exceptions import MutualTLSChannelError
46+
from google.cloud.logging_v2.services.logging_service_v2 import LoggingServiceV2AsyncClient
47+
from google.cloud.logging_v2.services.logging_service_v2 import LoggingServiceV2Client
48+
from google.cloud.logging_v2.services.logging_service_v2 import pagers
49+
from google.cloud.logging_v2.services.logging_service_v2 import transports
50+
from google.cloud.logging_v2.types import log_entry
51+
from google.cloud.logging_v2.types import logging
52+
from google.longrunning import operations_pb2 # type: ignore
53+
from google.oauth2 import service_account
3754
import google.api.monitored_resource_pb2 as monitored_resource_pb2 # type: ignore
3855
import google.auth
3956
import google.logging.type.http_request_pb2 as http_request_pb2 # type: ignore
@@ -42,26 +59,8 @@
4259
import google.protobuf.duration_pb2 as duration_pb2 # type: ignore
4360
import google.protobuf.struct_pb2 as struct_pb2 # type: ignore
4461
import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
45-
from google.api_core import (
46-
client_options,
47-
gapic_v1,
48-
grpc_helpers,
49-
grpc_helpers_async,
50-
path_template,
51-
)
52-
from google.api_core import exceptions as core_exceptions
53-
from google.api_core import retry as retries
54-
from google.auth import credentials as ga_credentials
55-
from google.auth.exceptions import MutualTLSChannelError
56-
from google.cloud.logging_v2.services.logging_service_v2 import (
57-
LoggingServiceV2AsyncClient,
58-
LoggingServiceV2Client,
59-
pagers,
60-
transports,
61-
)
62-
from google.cloud.logging_v2.types import log_entry, logging
63-
from google.longrunning import operations_pb2 # type: ignore
64-
from google.oauth2 import service_account
62+
63+
6564

6665
CRED_INFO_JSON = {
6766
"credential_source": "/path/to/file",

packages/gapic-generator/tests/integration/goldens/logging/tests/unit/gapic/logging_v2/test_metrics_service_v2.py

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,54 +13,52 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
import asyncio
17-
import json
18-
import math
1916
import os
20-
from collections.abc import Mapping, Sequence
17+
import asyncio
2118
from unittest import mock
2219
from unittest.mock import AsyncMock
2320

2421
import grpc
22+
from grpc.experimental import aio
23+
import json
24+
import math
2525
import pytest
26+
from collections.abc import Sequence, Mapping
2627
from google.api_core import api_core_version
27-
from grpc.experimental import aio
28-
from proto.marshal.rules import wrappers
2928
from proto.marshal.rules.dates import DurationRule, TimestampRule
29+
from proto.marshal.rules import wrappers
3030

3131
try:
3232
from google.auth.aio import credentials as ga_credentials_async
3333
HAS_GOOGLE_AUTH_AIO = True
3434
except ImportError: # pragma: NO COVER
3535
HAS_GOOGLE_AUTH_AIO = False
3636

37+
from google.api_core import client_options
38+
from google.api_core import exceptions as core_exceptions
39+
from google.api_core import gapic_v1
40+
from google.api_core import grpc_helpers
41+
from google.api_core import grpc_helpers_async
42+
from google.api_core import path_template
43+
from google.api_core import retry as retries
44+
from google.auth import credentials as ga_credentials
45+
from google.auth.exceptions import MutualTLSChannelError
46+
from google.cloud.logging_v2.services.metrics_service_v2 import MetricsServiceV2AsyncClient
47+
from google.cloud.logging_v2.services.metrics_service_v2 import MetricsServiceV2Client
48+
from google.cloud.logging_v2.services.metrics_service_v2 import pagers
49+
from google.cloud.logging_v2.services.metrics_service_v2 import transports
50+
from google.cloud.logging_v2.types import logging_metrics
51+
from google.longrunning import operations_pb2 # type: ignore
52+
from google.oauth2 import service_account
3753
import google.api.distribution_pb2 as distribution_pb2 # type: ignore
3854
import google.api.label_pb2 as label_pb2 # type: ignore
3955
import google.api.launch_stage_pb2 as launch_stage_pb2 # type: ignore
4056
import google.api.metric_pb2 as metric_pb2 # type: ignore
4157
import google.auth
4258
import google.protobuf.duration_pb2 as duration_pb2 # type: ignore
4359
import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
44-
from google.api_core import (
45-
client_options,
46-
gapic_v1,
47-
grpc_helpers,
48-
grpc_helpers_async,
49-
path_template,
50-
)
51-
from google.api_core import exceptions as core_exceptions
52-
from google.api_core import retry as retries
53-
from google.auth import credentials as ga_credentials
54-
from google.auth.exceptions import MutualTLSChannelError
55-
from google.cloud.logging_v2.services.metrics_service_v2 import (
56-
MetricsServiceV2AsyncClient,
57-
MetricsServiceV2Client,
58-
pagers,
59-
transports,
60-
)
61-
from google.cloud.logging_v2.types import logging_metrics
62-
from google.longrunning import operations_pb2 # type: ignore
63-
from google.oauth2 import service_account
60+
61+
6462

6563
CRED_INFO_JSON = {
6664
"credential_source": "/path/to/file",

0 commit comments

Comments
 (0)