def test_product_path(): project = "squid" location = "clam" product = "whelk" expected = "projects/{project}/locations/{location}/products/{product}".format( project=project, location=location, product=product, ) actual = ImageAnnotatorClient.product_path(project, location, product) assert expected == actual
def test_parse_product_path(): expected = { "project": "octopus", "location": "oyster", "product": "nudibranch", } path = ImageAnnotatorClient.product_path(**expected) # Check that the path construction is reversible. actual = ImageAnnotatorClient.parse_product_path(path) assert expected == actual