def test_parse_campaign_asset_path():
    expected = {
        "customer_id": "squid",
        "campaign_id": "clam",
        "asset_id": "whelk",
        "field_type": "octopus",
    }
    path = CampaignAssetServiceClient.campaign_asset_path(**expected)

    # Check that the path construction is reversible.
    actual = CampaignAssetServiceClient.parse_campaign_asset_path(path)
    assert expected == actual
def test_campaign_asset_path():
    customer_id = "winkle"
    campaign_id = "nautilus"
    asset_id = "scallop"
    field_type = "abalone"
    expected = "customers/{customer_id}/campaignAssets/{campaign_id}~{asset_id}~{field_type}".format(
        customer_id=customer_id,
        campaign_id=campaign_id,
        asset_id=asset_id,
        field_type=field_type,
    )
    actual = CampaignAssetServiceClient.campaign_asset_path(
        customer_id, campaign_id, asset_id, field_type)
    assert expected == actual