def test_parse_recommendation_path(): expected = { "customer": "cuttlefish", "recommendation": "mussel", } path = RecommendationServiceClient.recommendation_path(**expected) # Check that the path construction is reversible. actual = RecommendationServiceClient.parse_recommendation_path(path) assert expected == actual
def test_recommendation_path(): customer = "oyster" recommendation = "nudibranch" expected = "customers/{customer}/recommendations/{recommendation}".format(customer=customer, recommendation=recommendation, ) actual = RecommendationServiceClient.recommendation_path(customer, recommendation) assert expected == actual