def test_ad_path():
    customer = "squid"
    ad = "clam"
    expected = "customers/{customer}/ads/{ad}".format(
        customer=customer,
        ad=ad,
    )
    actual = AdServiceClient.ad_path(customer, ad)
    assert expected == actual
def test_parse_ad_path():
    expected = {
        "customer": "whelk",
        "ad": "octopus",
    }
    path = AdServiceClient.ad_path(**expected)

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