Ejemplo n.º 1
0
def test_ad_group_path():
    customer = "squid"
    ad_group = "clam"
    expected = "customers/{customer}/adGroups/{ad_group}".format(
        customer=customer,
        ad_group=ad_group,
    )
    actual = FeedItemTargetServiceClient.ad_group_path(customer, ad_group)
    assert expected == actual
Ejemplo n.º 2
0
def test_parse_ad_group_path():
    expected = {
        "customer": "whelk",
        "ad_group": "octopus",
    }
    path = FeedItemTargetServiceClient.ad_group_path(**expected)

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