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

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sid-dinesh94 committed Oct 8, 2020
1 parent 73617c1 commit efed79a
Showing 1 changed file with 8 additions and 4 deletions.
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

0 comments on commit efed79a

Please sign in to comment.