Ejemplo n.º 1
0
def test_label_path():
    customer = "squid"
    label = "clam"
    expected = "customers/{customer}/labels/{label}".format(
        customer=customer,
        label=label,
    )
    actual = LabelServiceClient.label_path(customer, label)
    assert expected == actual
Ejemplo n.º 2
0
def test_parse_label_path():
    expected = {
        "customer": "whelk",
        "label": "octopus",
    }
    path = LabelServiceClient.label_path(**expected)

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