backport stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 14 Apr 2010 16:26:34 +0200
changeset 5249 842a40cade9a
parent 5246 3246b1f88a18 (current diff)
parent 5248 8f7843afb014 (diff)
child 5250 1c0eb5f74fd4
backport stable
devtools/__init__.py
devtools/testlib.py
--- a/devtools/__init__.py	Wed Apr 14 11:26:36 2010 +0200
+++ b/devtools/__init__.py	Wed Apr 14 16:26:34 2010 +0200
@@ -155,9 +155,6 @@
         sources = super(TestServerConfiguration, self).sources()
         if not sources:
             sources = DEFAULT_SOURCES
-        if sources['system']['db-driver'] == 'sqlite':
-            # we need an abspath in case tests are changing the cwd
-            sources['system']['db-name'] = abspath(sources['system']['db-name'])
         return sources
 
 
--- a/devtools/testlib.py	Wed Apr 14 11:26:36 2010 +0200
+++ b/devtools/testlib.py	Wed Apr 14 16:26:34 2010 +0200
@@ -497,9 +497,9 @@
     def app_publish(self, req, path='view'):
         return self.app.publish(path, req)
 
-    def ctrl_publish(self, req):
+    def ctrl_publish(self, req, ctrl='edit'):
         """call the publish method of the edit controller"""
-        ctrl = self.vreg['controllers'].select('edit', req)
+        ctrl = self.vreg['controllers'].select(ctrl, req)
         try:
             result = ctrl.publish()
             req.cnx.commit()
--- a/web/views/debug.py	Wed Apr 14 11:26:36 2010 +0200
+++ b/web/views/debug.py	Wed Apr 14 16:26:34 2010 +0200
@@ -165,5 +165,5 @@
         self.wview('pyvaltable', pyvalue=values[:self._cw.form.get('nb', 20)])
         if garbage:
             self.w(u'<h3>%s</h3>' % _('Unreachable objects'))
-            values = sorted(xml_escape(repr(o) for o in garbage))
+            values = sorted(xml_escape(repr(o)) for o in garbage)
             self.wview('pyvallist', pyvalue=values)