Пример #1
0
def test_feed_path():
    customer = "squid"
    feed = "clam"
    expected = "customers/{customer}/feeds/{feed}".format(
        customer=customer,
        feed=feed,
    )
    actual = FeedMappingServiceClient.feed_path(customer, feed)
    assert expected == actual
Пример #2
0
def test_parse_feed_path():
    expected = {
        "customer": "whelk",
        "feed": "octopus",
    }
    path = FeedMappingServiceClient.feed_path(**expected)

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