Skip to content

Commit a852abe

Browse files
authored
fix: Fixes VPCSC Tests that did not conform to V2.0.0 client API (#61)
The fix in the previous commit worked for the test_async_batch_annotate_images_write_blocked test. This commit updates other VPCSC tests to also work with the new client.
1 parent 1c2a2d8 commit a852abe

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

packages/google-cloud-vision/tests/system.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ def test_async_batch_annotate_files_read_blocked(self):
815815
"output_config": {"gcs_destination": {"uri": output_gcs_uri_prefix}},
816816
}
817817
with pytest.raises(exceptions.Forbidden) as exc:
818-
self.client.async_batch_annotate_files([request])
818+
self.client.async_batch_annotate_files(requests=[request])
819819

820820
assert self.gcs_read_error_message in exc.value.message
821821

@@ -844,7 +844,7 @@ def test_async_batch_annotate_files_write_blocked(self):
844844
"features": [{"type_": vision.Feature.Type.DOCUMENT_TEXT_DETECTION}],
845845
"output_config": {"gcs_destination": {"uri": output_gcs_uri_prefix}},
846846
}
847-
response = self.client.async_batch_annotate_files([request])
847+
response = self.client.async_batch_annotate_files(requests=[request])
848848

849849
# Wait for the operation to complete.
850850
lro_waiting_seconds = 90
@@ -868,7 +868,9 @@ def test_async_batch_annotate_images_read_blocked(self):
868868
bucket=self.test_bucket.name, method_name=method_name
869869
)
870870
output_config = {"gcs_destination": {"uri": output_gcs_uri_prefix}}
871-
response = self.client.async_batch_annotate_images([request], output_config)
871+
response = self.client.async_batch_annotate_images(
872+
requests=[request], output_config=output_config
873+
)
872874
# Wait for the operation to complete.
873875
lro_waiting_seconds = 90
874876
start_time = time.time()
@@ -905,7 +907,9 @@ def test_async_batch_annotate_images_write_blocked(self):
905907
bucket=vpcsc_config.bucket_outside, method_name=method_name
906908
)
907909
output_config = {"gcs_destination": {"uri": output_gcs_uri_prefix}}
908-
response = self.client.async_batch_annotate_images([request], output_config)
910+
response = self.client.async_batch_annotate_images(
911+
requests=[request], output_config=output_config
912+
)
909913
# Wait for the operation to complete.
910914
lro_waiting_seconds = 90
911915
start_time = time.time()

0 commit comments

Comments
 (0)