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