Skip to content

Commit

Permalink
detect-pdf update [(#1460)](GoogleCloudPlatform/python-docs-samples#1460
Browse files Browse the repository at this point in the history
)

* detect-pdf update

* update test
  • Loading branch information
dizcology authored and chenyumic committed Apr 24, 2018
1 parent a45d042 commit a45c72a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions samples/snippets/detect/detect_pdf_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,17 @@


def test_async_detect_document(capsys):
storage_client = storage.Client()
bucket = storage_client.get_bucket(BUCKET)
assert len(list(bucket.list_blobs(prefix=OUTPUT_PREFIX))) == 0

async_detect_document(
gcs_source_uri=GCS_SOURCE_URI,
gcs_destination_uri=GCS_DESTINATION_URI)
out, _ = capsys.readouterr()

assert 'Hodge conjecture' in out
assert len(list(bucket.list_blobs(prefix=OUTPUT_PREFIX))) == 3

storage_client = storage.Client()
bucket = storage_client.get_bucket(BUCKET)
for blob in bucket.list_blobs(prefix=OUTPUT_PREFIX):
blob.delete()
2 changes: 1 addition & 1 deletion samples/snippets/detect/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
google-cloud-vision==0.30.1
google-cloud-vision==0.31.0
google-cloud-storage==1.6.0

0 comments on commit a45c72a

Please sign in to comment.