Esempio n. 1
0
def test_ad_path():
    customer_id = "squid"
    ad_id = "clam"
    expected = "customers/{customer_id}/ads/{ad_id}".format(
        customer_id=customer_id,
        ad_id=ad_id,
    )
    actual = AdGroupAdServiceClient.ad_path(customer_id, ad_id)
    assert expected == actual
Esempio n. 2
0
def test_parse_ad_path():
    expected = {
        "customer_id": "whelk",
        "ad_id": "octopus",
    }
    path = AdGroupAdServiceClient.ad_path(**expected)

    # Check that the path construction is reversible.
    actual = AdGroupAdServiceClient.parse_ad_path(path)
    assert expected == actual