コード例 #1
0
def test_label_path():
    customer_id = "scallop"
    label_id = "abalone"
    expected = "customers/{customer_id}/labels/{label_id}".format(
        customer_id=customer_id,
        label_id=label_id,
    )
    actual = CampaignLabelServiceClient.label_path(customer_id, label_id)
    assert expected == actual
コード例 #2
0
def test_parse_label_path():
    expected = {
        "customer_id": "squid",
        "label_id": "clam",
    }
    path = CampaignLabelServiceClient.label_path(**expected)

    # Check that the path construction is reversible.
    actual = CampaignLabelServiceClient.parse_label_path(path)
    assert expected == actual