[pyramid] disable bwcompat by default in PyramidCWTest 3.25
authorPhilippe Pepiot <philippe.pepiot@logilab.fr>
Wed, 22 Mar 2017 14:18:54 +0100
branch3.25
changeset 12088 477a59a45786
parent 12087 9f668acfa6c3
child 12089 54b518367617
[pyramid] disable bwcompat by default in PyramidCWTest To avoid cubicweb exceptions handling.
cubicweb/pyramid/test/__init__.py
cubicweb/pyramid/test/test_bw_request.py
cubicweb/pyramid/test/test_core.py
cubicweb/pyramid/test/test_login.py
--- a/cubicweb/pyramid/test/__init__.py	Fri Mar 17 10:15:16 2017 +0100
+++ b/cubicweb/pyramid/test/__init__.py	Wed Mar 22 14:18:54 2017 +0100
@@ -15,7 +15,9 @@
     def setUp(self):
         # Skip CubicWebTestTC setUp
         super(CubicWebTestTC, self).setUp()
-        config = Configurator(settings=self.settings)
+        settings = {'cubicweb.bwcompat': False}
+        settings.update(self.settings)
+        config = Configurator(settings=settings)
         config.registry['cubicweb.repository'] = self.repo
         config.include('cubicweb.pyramid')
         self.includeme(config)
--- a/cubicweb/pyramid/test/test_bw_request.py	Fri Mar 17 10:15:16 2017 +0100
+++ b/cubicweb/pyramid/test/test_bw_request.py	Wed Mar 22 14:18:54 2017 +0100
@@ -10,6 +10,8 @@
 
 
 class WSGIAppTest(PyramidCWTest):
+    settings = {'cubicweb.bwcompat': True}
+
     def make_request(self, path, environ=None, **kw):
         r = webtest.app.TestRequest.blank(path, environ, **kw)
 
--- a/cubicweb/pyramid/test/test_core.py	Fri Mar 17 10:15:16 2017 +0100
+++ b/cubicweb/pyramid/test/test_core.py	Wed Mar 22 14:18:54 2017 +0100
@@ -24,6 +24,7 @@
 
 class CoreTest(PyramidCWTest):
     anonymous_allowed = True
+    settings = {'cubicweb.bwcompat': True}
 
     def includeme(self, config):
         config.add_route('uncommitable', '/uncommitable')
--- a/cubicweb/pyramid/test/test_login.py	Fri Mar 17 10:15:16 2017 +0100
+++ b/cubicweb/pyramid/test/test_login.py	Wed Mar 22 14:18:54 2017 +0100
@@ -21,6 +21,7 @@
 
 
 class LoginTest(PyramidCWTest):
+    settings = {'cubicweb.bwcompat': True}
 
     def test_login_form(self):
         res = self.webapp.get('/login')