def test_parse_ad_parameter_path():
    expected = {
        "customer_id": "scallop",
        "ad_group_id": "abalone",
        "criterion_id": "squid",
        "parameter_index": "clam",
    }
    path = AdParameterServiceClient.ad_parameter_path(**expected)

    # Check that the path construction is reversible.
    actual = AdParameterServiceClient.parse_ad_parameter_path(path)
    assert expected == actual
def test_ad_parameter_path():
    customer_id = "cuttlefish"
    ad_group_id = "mussel"
    criterion_id = "winkle"
    parameter_index = "nautilus"
    expected = "customers/{customer_id}/adParameters/{ad_group_id}~{criterion_id}~{parameter_index}".format(
        customer_id=customer_id,
        ad_group_id=ad_group_id,
        criterion_id=criterion_id,
        parameter_index=parameter_index,
    )
    actual = AdParameterServiceClient.ad_parameter_path(
        customer_id, ad_group_id, criterion_id, parameter_index)
    assert expected == actual