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
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