def test_parse_campaign_criterion_path():
    expected = {
        "customer_id": "mussel",
        "campaign_id": "winkle",
        "criterion_id": "nautilus",
    }
    path = CampaignCriterionServiceClient.campaign_criterion_path(**expected)

    # Check that the path construction is reversible.
    actual = CampaignCriterionServiceClient.parse_campaign_criterion_path(path)
    assert expected == actual
def test_campaign_criterion_path():
    customer_id = "oyster"
    campaign_id = "nudibranch"
    criterion_id = "cuttlefish"
    expected = "customers/{customer_id}/campaignCriteria/{campaign_id}~{criterion_id}".format(
        customer_id=customer_id,
        campaign_id=campaign_id,
        criterion_id=criterion_id,
    )
    actual = CampaignCriterionServiceClient.campaign_criterion_path(
        customer_id, campaign_id, criterion_id)
    assert expected == actual