Beispiel #1
0
def guillotina_main(loop):
    HARD_CACHE.clear()
    aioapp = make_app(settings=get_pg_settings(), loop=loop)
    aioapp.config.execute_actions()
    load_cached_schema()
    yield aioapp
    loop.run_until_complete(close_async_tasks(aioapp))
Beispiel #2
0
def guillotina_main(loop):
    HARD_CACHE.clear()
    from guillotina import test_package  # noqa
    aioapp = make_app(settings=PG_SETTINGS, loop=loop)
    aioapp.config.execute_actions()
    load_cached_schema()
    yield aioapp
Beispiel #3
0
def guillotina_main(loop):
    HARD_CACHE.clear()
    from guillotina import test_package  # noqa
    aioapp = make_app(settings=get_pg_settings(), loop=loop)
    aioapp.config.execute_actions()
    load_cached_schema()
    yield aioapp
    close_async_tasks()
Beispiel #4
0
def dummy_request(dummy_guillotina, monkeypatch):
    HARD_CACHE.clear()
    from guillotina.interfaces import IApplication
    from guillotina.component import get_utility
    root = get_utility(IApplication, name='root')
    db = root['db']

    request = get_mocked_request(db)
    return request
Beispiel #5
0
async def guillotina(test_server, postgres, guillotina_main, loop):
    HARD_CACHE.clear()
    server = await test_server(guillotina_main)
    requester = GuillotinaDBRequester(server=server, loop=loop)
    return requester
Beispiel #6
0
async def dummy_txn_root(dummy_request):
    HARD_CACHE.clear()
    return RootAsyncContextManager(dummy_request)