def test_parse_ad_group_criterion_path(): expected = { "customer_id": "nautilus", "ad_group_id": "scallop", "criterion_id": "abalone", } path = ClickViewServiceClient.ad_group_criterion_path(**expected) # Check that the path construction is reversible. actual = ClickViewServiceClient.parse_ad_group_criterion_path(path) assert expected == actual
def test_ad_group_criterion_path(): customer_id = "cuttlefish" ad_group_id = "mussel" criterion_id = "winkle" expected = "customers/{customer_id}/adGroupCriteria/{ad_group_id}~{criterion_id}".format( customer_id=customer_id, ad_group_id=ad_group_id, criterion_id=criterion_id, ) actual = ClickViewServiceClient.ad_group_criterion_path( customer_id, ad_group_id, criterion_id) assert expected == actual