예제 #1
0
def test_tenant_path():
    project = "cuttlefish"
    tenant = "mussel"
    expected = "projects/{project}/tenants/{tenant}".format(
        project=project, tenant=tenant,
    )
    actual = CompletionClient.tenant_path(project, tenant)
    assert expected == actual
예제 #2
0
def test_parse_tenant_path():
    expected = {
        "project": "winkle",
        "tenant": "nautilus",
    }
    path = CompletionClient.tenant_path(**expected)

    # Check that the path construction is reversible.
    actual = CompletionClient.parse_tenant_path(path)
    assert expected == actual