def file_store_service(): tenant_provider = StandardTenantProvider() tenant_provider.setup(Tenant(name="Default")) file_store_service = MemoryFileStoreService(tenant_provider) return file_store_service
def swift_file_store_service(swift_auth_supplier, mock_http_client): data_config = config standard_tenant_provider = StandardTenantProvider() standard_tenant_provider.setup(Tenant(id='2', name="custom-tenant")) return SwiftFileStoreService(standard_tenant_provider, swift_auth_supplier, mock_http_client, data_config)
def test_standard_tenant_provider_setup(tenant_provider): tenant = Tenant(name='Alpina') tenant_provider.setup(None) tenant_provider.setup(tenant) assert tenant_provider.tenant == tenant
def tenant_provider() -> StandardTenantProvider: tenant_provider = StandardTenantProvider() tenant_provider.setup(Tenant(name="Default")) return tenant_provider
def tenant_provider(): tenant_provider = StandardTenantProvider() tenant_provider.setup(Tenant(name="Origin")) return tenant_provider
def directory_file_store_service(tmp_path): config['dir_path'] = tmp_path / 'data' standard_tenant_provider = StandardTenantProvider() standard_tenant_provider.setup(Tenant(id='2', name="custom-tenant")) return DirectoryFileStoreService(standard_tenant_provider, config)