Ejemplo n.º 1
0
def test_product_set_path():
    project = "cuttlefish"
    location = "mussel"
    product_set = "winkle"

    expected = "projects/{project}/locations/{location}/productSets/{product_set}".format(
        project=project, location=location, product_set=product_set,
    )
    actual = ImageAnnotatorClient.product_set_path(project, location, product_set)
    assert expected == actual
Ejemplo n.º 2
0
def test_parse_product_set_path():
    expected = {
        "project": "nautilus",
        "location": "scallop",
        "product_set": "abalone",
    }
    path = ImageAnnotatorClient.product_set_path(**expected)

    # Check that the path construction is reversible.
    actual = ImageAnnotatorClient.parse_product_set_path(path)
    assert expected == actual