Пример #1
0
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
Пример #2
0
 def run_sample():
     detect.detect_web_uri(file_name)
Пример #3
0
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
Пример #4
0
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
Пример #5
0
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
Пример #6
0
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()
Пример #7
0
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()
Пример #8
0
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
Пример #9
0
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