def test_parse_label_path(): expected = { "customer": "winkle", "label": "nautilus", } path = CustomerLabelServiceClient.label_path(**expected) # Check that the path construction is reversible. actual = CustomerLabelServiceClient.parse_label_path(path) assert expected == actual
def test_label_path(): customer = "cuttlefish" label = "mussel" expected = "customers/{customer}/labels/{label}".format(customer=customer, label=label, ) actual = CustomerLabelServiceClient.label_path(customer, label) assert expected == actual