Skip to content
Permalink
Browse files
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 efed79a18c2c66bccb42aa214610fa5e7f9898dc
Showing with 8 additions and 4 deletions.
  1. +8 −4 tests/system.py
@@ -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

@@ -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
@@ -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()
@@ -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()

0 comments on commit efed79a

Please sign in to comment.