# HG changeset patch # User Denis Laxalde # Date 1487695292 -3600 # Node ID 6c035cfef04f68920e3677a59d4c1ab67d7ee21d # Parent b282ef22b5abd3babd3c0690638d65ea2fa98e38 [pyramid] Use existing repo in PyramidCWTest We thus do not make use of config_from_cwconfig() and build the configurator instance by hand prior to include 'cubicweb.pyramid'. diff -r b282ef22b5ab -r 6c035cfef04f cubicweb/pyramid/test/__init__.py --- a/cubicweb/pyramid/test/__init__.py Tue Feb 21 17:35:16 2017 +0100 +++ b/cubicweb/pyramid/test/__init__.py Tue Feb 21 17:41:32 2017 +0100 @@ -1,9 +1,8 @@ import webtest +from pyramid.config import Configurator from cubicweb.devtools.webtest import CubicWebTestTC -from cubicweb.pyramid import config_from_cwconfig - class PyramidCWTest(CubicWebTestTC): settings = {} @@ -16,7 +15,9 @@ def setUp(self): # Skip CubicWebTestTC setUp super(CubicWebTestTC, self).setUp() - config = config_from_cwconfig(self.config, self.settings) + config = Configurator(settings=self.settings) + config.registry['cubicweb.repository'] = self.repo + config.include('cubicweb.pyramid') self.includeme(config) self.pyr_registry = config.registry self.webapp = webtest.TestApp(