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 = RecommendationServiceClient.ad_path(customer_id, ad_id)
    assert expected == actual
def test_parse_ad_path():
    expected = {
        "customer_id": "whelk",
        "ad_id": "octopus",
    }
    path = RecommendationServiceClient.ad_path(**expected)

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