コード例 #1
0
def test_parse_customer_asset_path():
    expected = {
        "customer_id": "mussel",
        "asset_id": "winkle",
        "field_type": "nautilus",
    }
    path = CustomerAssetServiceClient.customer_asset_path(**expected)

    # Check that the path construction is reversible.
    actual = CustomerAssetServiceClient.parse_customer_asset_path(path)
    assert expected == actual
コード例 #2
0
def test_customer_asset_path():
    customer_id = "oyster"
    asset_id = "nudibranch"
    field_type = "cuttlefish"
    expected = "customers/{customer_id}/customerAssets/{asset_id}~{field_type}".format(
        customer_id=customer_id,
        asset_id=asset_id,
        field_type=field_type,
    )
    actual = CustomerAssetServiceClient.customer_asset_path(
        customer_id, asset_id, field_type)
    assert expected == actual