Пример #1
0
def test_parse_ad_group_criterion_path():
    expected = {
        "customer_id": "octopus",
        "ad_group_id": "oyster",
        "criterion_id": "nudibranch",
    }
    path = AdParameterServiceClient.ad_group_criterion_path(**expected)

    # Check that the path construction is reversible.
    actual = AdParameterServiceClient.parse_ad_group_criterion_path(path)
    assert expected == actual
Пример #2
0
def test_ad_group_criterion_path():
    customer_id = "squid"
    ad_group_id = "clam"
    criterion_id = "whelk"
    expected = "customers/{customer_id}/adGroupCriteria/{ad_group_id}~{criterion_id}".format(
        customer_id=customer_id,
        ad_group_id=ad_group_id,
        criterion_id=criterion_id,
    )
    actual = AdParameterServiceClient.ad_group_criterion_path(
        customer_id, ad_group_id, criterion_id)
    assert expected == actual