[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'.
--- 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(