Skip to content
This repository was archived by the owner on Nov 14, 2023. It is now read-only.

Commit cfe3223

Browse files
chore: use gapic-generator-python 0.65.2 (#34)
* chore: use gapic-generator-python 0.65.2 PiperOrigin-RevId: 444333013 Source-Link: googleapis/googleapis@f91b6cf Source-Link: https://github.com/googleapis/googleapis-gen/commit/16eb36095c294e712c74a1bf23550817b42174e5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTZlYjM2MDk1YzI5NGU3MTJjNzRhMWJmMjM1NTA4MTdiNDIxNzRlNSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent 29348e8 commit cfe3223

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

google/cloud/optimization_v1/services/fleet_routing/async_client.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -250,17 +250,17 @@ async def optimize_tours(
250250
251251
from google.cloud import optimization_v1
252252
253-
def sample_optimize_tours():
253+
async def sample_optimize_tours():
254254
# Create a client
255-
client = optimization_v1.FleetRoutingClient()
255+
client = optimization_v1.FleetRoutingAsyncClient()
256256
257257
# Initialize request argument(s)
258258
request = optimization_v1.OptimizeToursRequest(
259259
parent="parent_value",
260260
)
261261
262262
# Make the request
263-
response = client.optimize_tours(request=request)
263+
response = await client.optimize_tours(request=request)
264264
265265
# Handle the response
266266
print(response)
@@ -346,9 +346,9 @@ async def batch_optimize_tours(
346346
347347
from google.cloud import optimization_v1
348348
349-
def sample_batch_optimize_tours():
349+
async def sample_batch_optimize_tours():
350350
# Create a client
351-
client = optimization_v1.FleetRoutingClient()
351+
client = optimization_v1.FleetRoutingAsyncClient()
352352
353353
# Initialize request argument(s)
354354
model_configs = optimization_v1.AsyncModelConfig()
@@ -365,7 +365,7 @@ def sample_batch_optimize_tours():
365365
366366
print("Waiting for operation to complete...")
367367
368-
response = operation.result()
368+
response = await operation.result()
369369
370370
# Handle the response
371371
print(response)

tests/unit/gapic/optimization_v1/test_fleet_routing.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ def test_optimize_tours_field_headers():
742742
# a field header. Set these to a non-empty value.
743743
request = fleet_routing.OptimizeToursRequest()
744744

745-
request.parent = "parent/value"
745+
request.parent = "parent_value"
746746

747747
# Mock the actual call within the gRPC stub, and fake the request.
748748
with mock.patch.object(type(client.transport.optimize_tours), "__call__") as call:
@@ -758,7 +758,7 @@ def test_optimize_tours_field_headers():
758758
_, _, kw = call.mock_calls[0]
759759
assert (
760760
"x-goog-request-params",
761-
"parent=parent/value",
761+
"parent=parent_value",
762762
) in kw["metadata"]
763763

764764

@@ -772,7 +772,7 @@ async def test_optimize_tours_field_headers_async():
772772
# a field header. Set these to a non-empty value.
773773
request = fleet_routing.OptimizeToursRequest()
774774

775-
request.parent = "parent/value"
775+
request.parent = "parent_value"
776776

777777
# Mock the actual call within the gRPC stub, and fake the request.
778778
with mock.patch.object(type(client.transport.optimize_tours), "__call__") as call:
@@ -790,7 +790,7 @@ async def test_optimize_tours_field_headers_async():
790790
_, _, kw = call.mock_calls[0]
791791
assert (
792792
"x-goog-request-params",
793-
"parent=parent/value",
793+
"parent=parent_value",
794794
) in kw["metadata"]
795795

796796

@@ -893,7 +893,7 @@ def test_batch_optimize_tours_field_headers():
893893
# a field header. Set these to a non-empty value.
894894
request = fleet_routing.BatchOptimizeToursRequest()
895895

896-
request.parent = "parent/value"
896+
request.parent = "parent_value"
897897

898898
# Mock the actual call within the gRPC stub, and fake the request.
899899
with mock.patch.object(
@@ -911,7 +911,7 @@ def test_batch_optimize_tours_field_headers():
911911
_, _, kw = call.mock_calls[0]
912912
assert (
913913
"x-goog-request-params",
914-
"parent=parent/value",
914+
"parent=parent_value",
915915
) in kw["metadata"]
916916

917917

@@ -925,7 +925,7 @@ async def test_batch_optimize_tours_field_headers_async():
925925
# a field header. Set these to a non-empty value.
926926
request = fleet_routing.BatchOptimizeToursRequest()
927927

928-
request.parent = "parent/value"
928+
request.parent = "parent_value"
929929

930930
# Mock the actual call within the gRPC stub, and fake the request.
931931
with mock.patch.object(
@@ -945,7 +945,7 @@ async def test_batch_optimize_tours_field_headers_async():
945945
_, _, kw = call.mock_calls[0]
946946
assert (
947947
"x-goog-request-params",
948-
"parent=parent/value",
948+
"parent=parent_value",
949949
) in kw["metadata"]
950950

951951

0 commit comments

Comments
 (0)