Пример #1
0
def test_extension_feed_item_path():
    customer_id = "oyster"
    feed_item_id = "nudibranch"
    expected = "customers/{customer_id}/extensionFeedItems/{feed_item_id}".format(
        customer_id=customer_id,
        feed_item_id=feed_item_id,
    )
    actual = CustomerExtensionSettingServiceClient.extension_feed_item_path(
        customer_id, feed_item_id)
    assert expected == actual
Пример #2
0
def test_parse_extension_feed_item_path():
    expected = {
        "customer_id": "cuttlefish",
        "feed_item_id": "mussel",
    }
    path = CustomerExtensionSettingServiceClient.extension_feed_item_path(
        **expected)

    # Check that the path construction is reversible.
    actual = CustomerExtensionSettingServiceClient.parse_extension_feed_item_path(
        path)
    assert expected == actual