def test_parse_ad_group_asset_path():
    expected = {
        "customer_id": "winkle",
        "ad_group_id": "nautilus",
        "asset_id": "scallop",
        "field_type": "abalone",
    }
    path = AdGroupAssetServiceClient.ad_group_asset_path(**expected)

    # Check that the path construction is reversible.
    actual = AdGroupAssetServiceClient.parse_ad_group_asset_path(path)
    assert expected == actual
def test_ad_group_asset_path():
    customer_id = "oyster"
    ad_group_id = "nudibranch"
    asset_id = "cuttlefish"
    field_type = "mussel"
    expected = "customers/{customer_id}/adGroupAssets/{ad_group_id}~{asset_id}~{field_type}".format(
        customer_id=customer_id,
        ad_group_id=ad_group_id,
        asset_id=asset_id,
        field_type=field_type,
    )
    actual = AdGroupAssetServiceClient.ad_group_asset_path(
        customer_id, ad_group_id, asset_id, field_type)
    assert expected == actual