Esempio n. 1
0
def test_ad_group_path():
    customer_id = "squid"
    ad_group_id = "clam"
    expected = "customers/{customer_id}/adGroups/{ad_group_id}".format(
        customer_id=customer_id,
        ad_group_id=ad_group_id,
    )
    actual = ChangeStatusServiceClient.ad_group_path(customer_id, ad_group_id)
    assert expected == actual
Esempio n. 2
0
def test_parse_ad_group_path():
    expected = {
        "customer_id": "whelk",
        "ad_group_id": "octopus",
    }
    path = ChangeStatusServiceClient.ad_group_path(**expected)

    # Check that the path construction is reversible.
    actual = ChangeStatusServiceClient.parse_ad_group_path(path)
    assert expected == actual