Esempio n. 1
0
def test_parse_shared_criterion_path():
    expected = {
        "customer": "whelk",
        "shared_criterion": "octopus",
    }
    path = SharedCriterionServiceClient.shared_criterion_path(**expected)

    # Check that the path construction is reversible.
    actual = SharedCriterionServiceClient.parse_shared_criterion_path(path)
    assert expected == actual
Esempio n. 2
0
def test_shared_criterion_path():
    customer = "squid"
    shared_criterion = "clam"
    expected = "customers/{customer}/sharedCriteria/{shared_criterion}".format(
        customer=customer,
        shared_criterion=shared_criterion,
    )
    actual = SharedCriterionServiceClient.shared_criterion_path(
        customer, shared_criterion)
    assert expected == actual