Example #1
0
def test_tenant_path():
    project = "squid"
    tenant = "clam"
    expected = "projects/{project}/tenants/{tenant}".format(
        project=project,
        tenant=tenant,
    )
    actual = EventServiceClient.tenant_path(project, tenant)
    assert expected == actual
Example #2
0
def test_parse_tenant_path():
    expected = {
        "project": "whelk",
        "tenant": "octopus",
    }
    path = EventServiceClient.tenant_path(**expected)

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