cubicweb/pyramid/init_instance.py
author Denis Laxalde <denis.laxalde@logilab.fr>
Fri, 18 Nov 2016 10:28:41 +0100
branch3.24
changeset 11923 acfb9aa4845e
parent 11631 faf279e33298
permissions -rw-r--r--
[devtools] Make timeout error in qunit tests configurable and use SkipTest in test_jscript.py This is grafted from 87443f279b0f in default branch (got tired of CI failing because of these unreliable tests).

from cubicweb.cwconfig import CubicWebConfiguration


def includeme(config):
    appid = config.registry.settings['cubicweb.instance']
    cwconfig = CubicWebConfiguration.config_for(appid)

    config.registry['cubicweb.config'] = cwconfig
    config.registry['cubicweb.repository'] = repo = cwconfig.repository()
    config.registry['cubicweb.registry'] = repo.vreg