예제 #1
0
def test_parse_recommendation_path():
    expected = {
        "customer_id": "cuttlefish",
        "recommendation_id": "mussel",
    }
    path = RecommendationServiceClient.recommendation_path(**expected)

    # Check that the path construction is reversible.
    actual = RecommendationServiceClient.parse_recommendation_path(path)
    assert expected == actual
예제 #2
0
def test_recommendation_path():
    customer_id = "oyster"
    recommendation_id = "nudibranch"
    expected = "customers/{customer_id}/recommendations/{recommendation_id}".format(
        customer_id=customer_id,
        recommendation_id=recommendation_id,
    )
    actual = RecommendationServiceClient.recommendation_path(
        customer_id, recommendation_id)
    assert expected == actual