def test_ad_group_ad_path(): customer_id = "squid" ad_group_id = "clam" ad_id = "whelk" expected = "customers/{customer_id}/adGroupAds/{ad_group_id}~{ad_id}".format(customer_id=customer_id, ad_group_id=ad_group_id, ad_id=ad_id, ) actual = AdGroupAdLabelServiceClient.ad_group_ad_path(customer_id, ad_group_id, ad_id) assert expected == actual
def test_parse_ad_group_ad_path(): expected = { "customer_id": "octopus", "ad_group_id": "oyster", "ad_id": "nudibranch", } path = AdGroupAdLabelServiceClient.ad_group_ad_path(**expected) # Check that the path construction is reversible. actual = AdGroupAdLabelServiceClient.parse_ad_group_ad_path(path) assert expected == actual