Ejemplo n.º 1
0
def test_asset_path():
    customer = "squid"
    asset = "clam"
    expected = "customers/{customer}/assets/{asset}".format(
        customer=customer,
        asset=asset,
    )
    actual = AssetServiceClient.asset_path(customer, asset)
    assert expected == actual
Ejemplo n.º 2
0
def test_parse_asset_path():
    expected = {
        "customer": "whelk",
        "asset": "octopus",
    }
    path = AssetServiceClient.asset_path(**expected)

    # Check that the path construction is reversible.
    actual = AssetServiceClient.parse_asset_path(path)
    assert expected == actual