def file_store_service():
    tenant_provider = StandardTenantProvider()
    tenant_provider.setup(Tenant(name="Default"))

    file_store_service = MemoryFileStoreService(tenant_provider)

    return file_store_service
Example #2
0
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)
Example #3
0
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
Example #4
0
def tenant_provider() -> StandardTenantProvider:
    tenant_provider = StandardTenantProvider()
    tenant_provider.setup(Tenant(name="Default"))
    return tenant_provider
Example #5
0
def tenant_provider():
    tenant_provider = StandardTenantProvider()
    tenant_provider.setup(Tenant(name="Origin"))
    return tenant_provider
Example #6
0
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)