Beispiel #1
0
def test_feed_placeholder_view_path():
    customer = "squid"
    feed_placeholder_view = "clam"
    expected = "customers/{customer}/feedPlaceholderViews/{feed_placeholder_view}".format(
        customer=customer,
        feed_placeholder_view=feed_placeholder_view,
    )
    actual = FeedPlaceholderViewServiceClient.feed_placeholder_view_path(
        customer, feed_placeholder_view)
    assert expected == actual
Beispiel #2
0
def test_parse_feed_placeholder_view_path():
    expected = {
        "customer": "whelk",
        "feed_placeholder_view": "octopus",
    }
    path = FeedPlaceholderViewServiceClient.feed_placeholder_view_path(
        **expected)

    # Check that the path construction is reversible.
    actual = FeedPlaceholderViewServiceClient.parse_feed_placeholder_view_path(
        path)
    assert expected == actual