def test_ad_group_ad_label_path(): customer_id = "cuttlefish" ad_group_id = "mussel" ad_id = "winkle" label_id = "nautilus" expected = "customers/{customer_id}/adGroupAdLabels/{ad_group_id}~{ad_id}~{label_id}".format(customer_id=customer_id, ad_group_id=ad_group_id, ad_id=ad_id, label_id=label_id, ) actual = AdGroupAdLabelServiceClient.ad_group_ad_label_path(customer_id, ad_group_id, ad_id, label_id) assert expected == actual
def test_parse_ad_group_ad_label_path(): expected = { "customer_id": "scallop", "ad_group_id": "abalone", "ad_id": "squid", "label_id": "clam", } path = AdGroupAdLabelServiceClient.ad_group_ad_label_path(**expected) # Check that the path construction is reversible. actual = AdGroupAdLabelServiceClient.parse_ad_group_ad_label_path(path) assert expected == actual