コード例 #1
0
def test_feed_item_path():
    customer = "oyster"
    feed_item = "nudibranch"
    expected = "customers/{customer}/feedItems/{feed_item}".format(
        customer=customer,
        feed_item=feed_item,
    )
    actual = FeedItemServiceClient.feed_item_path(customer, feed_item)
    assert expected == actual
コード例 #2
0
def test_parse_feed_item_path():
    expected = {
        "customer": "cuttlefish",
        "feed_item": "mussel",
    }
    path = FeedItemServiceClient.feed_item_path(**expected)

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