コード例 #1
0
def test_feed_path():
    customer_id = "scallop"
    feed_id = "abalone"
    expected = "customers/{customer_id}/feeds/{feed_id}".format(
        customer_id=customer_id,
        feed_id=feed_id,
    )
    actual = CampaignServiceClient.feed_path(customer_id, feed_id)
    assert expected == actual
コード例 #2
0
def test_parse_feed_path():
    expected = {
        "customer_id": "squid",
        "feed_id": "clam",
    }
    path = CampaignServiceClient.feed_path(**expected)

    # Check that the path construction is reversible.
    actual = CampaignServiceClient.parse_feed_path(path)
    assert expected == actual