Example #1
0
def test_customer_manager_link_path():
    customer_id = "whelk"
    manager_customer_id = "octopus"
    manager_link_id = "oyster"
    expected = "customers/{customer_id}/customerManagerLinks/{manager_customer_id}~{manager_link_id}".format(
        customer_id=customer_id,
        manager_customer_id=manager_customer_id,
        manager_link_id=manager_link_id,
    )
    actual = CustomerManagerLinkServiceClient.customer_manager_link_path(
        customer_id, manager_customer_id, manager_link_id)
    assert expected == actual
Example #2
0
def test_parse_customer_manager_link_path():
    expected = {
        "customer_id": "nudibranch",
        "manager_customer_id": "cuttlefish",
        "manager_link_id": "mussel",
    }
    path = CustomerManagerLinkServiceClient.customer_manager_link_path(
        **expected)

    # Check that the path construction is reversible.
    actual = CustomerManagerLinkServiceClient.parse_customer_manager_link_path(
        path)
    assert expected == actual