Exemplo n.º 1
0
def test_parse_distance_view_path():
    expected = {
        "customer_id": "octopus",
        "placeholder_chain_id": "oyster",
        "distance_bucket": "nudibranch",
    }
    path = DistanceViewServiceClient.distance_view_path(**expected)

    # Check that the path construction is reversible.
    actual = DistanceViewServiceClient.parse_distance_view_path(path)
    assert expected == actual
Exemplo n.º 2
0
def test_distance_view_path():
    customer_id = "squid"
    placeholder_chain_id = "clam"
    distance_bucket = "whelk"
    expected = "customers/{customer_id}/distanceViews/{placeholder_chain_id}~{distance_bucket}".format(
        customer_id=customer_id,
        placeholder_chain_id=placeholder_chain_id,
        distance_bucket=distance_bucket,
    )
    actual = DistanceViewServiceClient.distance_view_path(
        customer_id, placeholder_chain_id, distance_bucket)
    assert expected == actual