Ejemplo n.º 1
0
def test_create_reference_image(capsys):
    create_reference_image(
        PROJECT_ID, LOCATION, PRODUCT_ID, REFERENCE_IMAGE_ID,
        GCS_URI)
    list_reference_images(PROJECT_ID, LOCATION, PRODUCT_ID)
    out, _ = capsys.readouterr()
    assert REFERENCE_IMAGE_ID in out
Ejemplo n.º 2
0
def test_create_reference_image(capsys, product):
    list_reference_images(PROJECT_ID, LOCATION, PRODUCT_ID)
    out, _ = capsys.readouterr()
    assert REFERENCE_IMAGE_ID not in out

    create_reference_image(PROJECT_ID, LOCATION, PRODUCT_ID,
                           REFERENCE_IMAGE_ID, GCS_URI)
    list_reference_images(PROJECT_ID, LOCATION, PRODUCT_ID)
    out, _ = capsys.readouterr()
    assert REFERENCE_IMAGE_ID in out

    delete_product(PROJECT_ID, LOCATION, PRODUCT_ID)
def test_create_reference_image(capsys, product):
    list_reference_images(PROJECT_ID, LOCATION, PRODUCT_ID)
    out, _ = capsys.readouterr()
    assert REFERENCE_IMAGE_ID not in out

    create_reference_image(
        PROJECT_ID, LOCATION, PRODUCT_ID, REFERENCE_IMAGE_ID,
        GCS_URI)
    list_reference_images(PROJECT_ID, LOCATION, PRODUCT_ID)
    out, _ = capsys.readouterr()
    assert REFERENCE_IMAGE_ID in out

    delete_product(PROJECT_ID, LOCATION, PRODUCT_ID)