Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

fix: Fixes VPCSC Tests that did not conform to V2.0.0 client API #61

Merged
merged 5 commits into from Oct 8, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 8 additions & 4 deletions tests/system.py
Expand Up @@ -815,7 +815,7 @@ def test_async_batch_annotate_files_read_blocked(self):
"output_config": {"gcs_destination": {"uri": output_gcs_uri_prefix}},
}
with pytest.raises(exceptions.Forbidden) as exc:
self.client.async_batch_annotate_files([request])
self.client.async_batch_annotate_files(requests=[request])

assert self.gcs_read_error_message in exc.value.message

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

# Wait for the operation to complete.
lro_waiting_seconds = 90
Expand All @@ -868,7 +868,9 @@ def test_async_batch_annotate_images_read_blocked(self):
bucket=self.test_bucket.name, method_name=method_name
)
output_config = {"gcs_destination": {"uri": output_gcs_uri_prefix}}
response = self.client.async_batch_annotate_images([request], output_config)
response = self.client.async_batch_annotate_images(
requests=[request], output_config=output_config
)
# Wait for the operation to complete.
lro_waiting_seconds = 90
start_time = time.time()
Expand Down Expand Up @@ -905,7 +907,9 @@ def test_async_batch_annotate_images_write_blocked(self):
bucket=vpcsc_config.bucket_outside, method_name=method_name
)
output_config = {"gcs_destination": {"uri": output_gcs_uri_prefix}}
response = self.client.async_batch_annotate_images([request], output_config)
response = self.client.async_batch_annotate_images(
requests=[request], output_config=output_config
)
# Wait for the operation to complete.
lro_waiting_seconds = 90
start_time = time.time()
Expand Down