def test_detect_web_http(capsys): uri = 'https://storage-download.googleapis.com/{}/vision/landmark.jpg' detect.detect_web_uri(uri.format(BUCKET)) out, _ = capsys.readouterr() assert 'Description: Palace of Fine Arts Theatre' in out
def run_sample(): detect.detect_web_uri(file_name)
def test_detect_web_uri(capsys): file_name = 'gs://{}/vision/landmark.jpg'.format(BUCKET) detect.detect_web_uri(file_name) out, _ = capsys.readouterr() assert 'Description: Palace of Fine Arts Theatre' in out
def test_detect_web_http(capsys): uri = 'https://storage-download.googleapis.com/{}/vision/landmark/pofa.jpg' detect.detect_web_uri(uri.format(ASSET_BUCKET)) out, _ = capsys.readouterr() assert 'best guess label: palace of fine arts' in out.lower()
def test_detect_web_uri(capsys): file_name = 'gs://{}/vision/landmark/pofa.jpg'.format(ASSET_BUCKET) detect.detect_web_uri(file_name) out, _ = capsys.readouterr() assert 'best guess label: palace of fine arts' in out.lower()
def test_detect_web_uri(capsys): file_name = 'gs://python-docs-samples-tests/vision/landmark.jpg' detect.detect_web_uri(file_name) out, _ = capsys.readouterr() assert 'Description: Palace of Fine Arts Theatre' in out
def test_detect_web_uri(cloud_config, capsys): file_name = ('gs://{}/vision/landmark.jpg'.format( cloud_config.storage_bucket)) detect.detect_web_uri(file_name) out, _ = capsys.readouterr() assert 'Description: Palace of Fine Arts Theatre' in out