def test_detect_web_http(capsys): web_detect.report( web_detect.annotate( 'https://cloud.google.com/images/products/vision/extract-text.png') ) out, _ = capsys.readouterr() assert 'web entities' in out.lower()
def test_detect_file(capsys): file_name = ('../detect/resources/landmark.jpg') web_detect.report(web_detect.annotate(file_name)) out, _ = capsys.readouterr() print(out) assert 'description' in out.lower() assert 'palace' in out.lower()
def test_detect_web_gsuri(capsys): file_name = ('gs://{}/vision/landmark/pofa.jpg'.format(ASSET_BUCKET)) web_detect.report(web_detect.annotate(file_name)) out, _ = capsys.readouterr() assert 'description:' in out.lower() assert 'palace' in out.lower()
def test_detect_web_gsuri(cloud_config, capsys): file_name = ('gs://{}/vision/landmark.jpg'.format( cloud_config.storage_bucket)) web_detect.report(web_detect.annotate(file_name)) out, _ = capsys.readouterr() assert 'Description: Palace of Fine Arts Theatre' in out
def test_detect_web_http(cloud_config, capsys): web_detect.report(web_detect.annotate('https://goo.gl/X4qcB6')) out, _ = capsys.readouterr() assert 'https://cloud.google.com/vision/' in out
def test_detect_web_http(capsys): web_detect.report(web_detect.annotate('https://goo.gl/X4qcB6')) out, _ = capsys.readouterr() assert 'https://cloud.google.com/vision/' in out
def test_detect_file(cloud_config, capsys): file_name = ('../detect/resources/landmark.jpg') web_detect.report(web_detect.annotate(file_name)) out, _ = capsys.readouterr() assert 'Description: Palace of Fine Arts Theatre' in out
def test_detect_web_gsuri(capsys): file_name = ('gs://{}/vision/landmark.jpg'.format(BUCKET)) web_detect.report(web_detect.annotate(file_name)) out, _ = capsys.readouterr() assert 'Description: Palace of Fine Arts Theatre' in out
def test_detect_file(capsys): file_name = ('../detect/resources/landmark.jpg') web_detect.report(web_detect.annotate(file_name)) out, _ = capsys.readouterr() assert 'Description: Palace of Fine Arts Theatre' in out
def test_detect_web_http(capsys): web_detect.report(web_detect.annotate( 'https://cloud.google.com/images/products/vision/extract-text.png')) out, _ = capsys.readouterr() assert 'https://cloud.google.com/vision/' in out
def test_detect_web_gsuri(capsys): file_name = ('gs://{}/vision/landmark/pofa.jpg'.format( ASSET_BUCKET)) web_detect.report(web_detect.annotate(file_name)) out, _ = capsys.readouterr() assert 'description: palace of fine arts' in out.lower()
def test_detect_file(capsys): file_name = ('../detect/resources/landmark.jpg') web_detect.report(web_detect.annotate(file_name)) out, _ = capsys.readouterr() print(out) assert 'description: palace of fine arts' in out.lower()