Пример #1
0
def test_parse_campaign_path():
    expected = {
        "customer_id": "scallop",
        "campaign_id": "abalone",
    }
    path = RecommendationServiceClient.campaign_path(**expected)

    # Check that the path construction is reversible.
    actual = RecommendationServiceClient.parse_campaign_path(path)
    assert expected == actual
Пример #2
0
def test_campaign_path():
    customer_id = "winkle"
    campaign_id = "nautilus"
    expected = "customers/{customer_id}/campaigns/{campaign_id}".format(
        customer_id=customer_id,
        campaign_id=campaign_id,
    )
    actual = RecommendationServiceClient.campaign_path(customer_id,
                                                       campaign_id)
    assert expected == actual