Esempio n. 1
0
def test_campaign_path():
    customer = "squid"
    campaign = "clam"
    expected = "customers/{customer}/campaigns/{campaign}".format(
        customer=customer,
        campaign=campaign,
    )
    actual = CampaignSharedSetServiceClient.campaign_path(customer, campaign)
    assert expected == actual
Esempio n. 2
0
def test_parse_campaign_path():
    expected = {
        "customer": "whelk",
        "campaign": "octopus",
    }
    path = CampaignSharedSetServiceClient.campaign_path(**expected)

    # Check that the path construction is reversible.
    actual = CampaignSharedSetServiceClient.parse_campaign_path(path)
    assert expected == actual