def test_parse_feed_item_path(): expected = { "customer_id": "octopus", "feed_id": "oyster", "feed_item_id": "nudibranch", } path = FeedItemSetLinkServiceClient.feed_item_path(**expected) # Check that the path construction is reversible. actual = FeedItemSetLinkServiceClient.parse_feed_item_path(path) assert expected == actual
def test_feed_item_path(): customer_id = "squid" feed_id = "clam" feed_item_id = "whelk" expected = "customers/{customer_id}/feedItems/{feed_id}~{feed_item_id}".format( customer_id=customer_id, feed_id=feed_id, feed_item_id=feed_item_id, ) actual = FeedItemSetLinkServiceClient.feed_item_path( customer_id, feed_id, feed_item_id) assert expected == actual