Esempio n. 1
0
def test_parse_campaign_feed_path():
    expected = {
        "customer_id": "nudibranch",
        "campaign_id": "cuttlefish",
        "feed_id": "mussel",
    }
    path = ChangeStatusServiceClient.campaign_feed_path(**expected)

    # Check that the path construction is reversible.
    actual = ChangeStatusServiceClient.parse_campaign_feed_path(path)
    assert expected == actual
Esempio n. 2
0
def test_campaign_feed_path():
    customer_id = "whelk"
    campaign_id = "octopus"
    feed_id = "oyster"
    expected = "customers/{customer_id}/campaignFeeds/{campaign_id}~{feed_id}".format(
        customer_id=customer_id,
        campaign_id=campaign_id,
        feed_id=feed_id,
    )
    actual = ChangeStatusServiceClient.campaign_feed_path(
        customer_id, campaign_id, feed_id)
    assert expected == actual