def test_ad_group_ad_asset_view_path(): customer_id = "cuttlefish" ad_group_id = "mussel" ad_id = "winkle" asset_id = "nautilus" field_type = "scallop" expected = "customers/{customer_id}/adGroupAdAssetViews/{ad_group_id}~{ad_id}~{asset_id}~{field_type}".format(customer_id=customer_id, ad_group_id=ad_group_id, ad_id=ad_id, asset_id=asset_id, field_type=field_type, ) actual = AdGroupAdAssetViewServiceClient.ad_group_ad_asset_view_path(customer_id, ad_group_id, ad_id, asset_id, field_type) assert expected == actual
def test_parse_ad_group_ad_asset_view_path(): expected = { "customer_id": "abalone", "ad_group_id": "squid", "ad_id": "clam", "asset_id": "whelk", "field_type": "octopus", } path = AdGroupAdAssetViewServiceClient.ad_group_ad_asset_view_path(**expected) # Check that the path construction is reversible. actual = AdGroupAdAssetViewServiceClient.parse_ad_group_ad_asset_view_path(path) assert expected == actual