Ejemplo n.º 1
0
def test_feed_item_path():
    customer = "winkle"
    feed_item = "nautilus"
    expected = "customers/{customer}/feedItems/{feed_item}".format(
        customer=customer,
        feed_item=feed_item,
    )
    actual = FeedItemTargetServiceClient.feed_item_path(customer, feed_item)
    assert expected == actual
Ejemplo n.º 2
0
def test_parse_feed_item_path():
    expected = {
        "customer": "scallop",
        "feed_item": "abalone",
    }
    path = FeedItemTargetServiceClient.feed_item_path(**expected)

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