merge tls-sprint
authorsylvain.thenault@logilab.fr
Wed, 13 May 2009 11:02:47 +0200
branchtls-sprint
changeset 1779 e11b0dcc26bd
parent 1778 311026c9073a (diff)
parent 1777 7bd776052e2b (current diff)
child 1780 7549509ce0e6
merge
--- a/devtools/devctl.py	Wed May 13 10:56:24 2009 +0200
+++ b/devtools/devctl.py	Wed May 13 11:02:47 2009 +0200
@@ -36,7 +36,7 @@
         if cube is None:
             self._cubes = ()
         else:
-            self._cubes = self.expand_cubes(self.my_cubes(cube))
+            self._cubes = self.reorder_cubes(self.expand_cubes(self.my_cubes(cube)))
 
     def my_cubes(self, cube):
         return (cube,) + self.cube_dependencies(cube) + self.cube_recommends(cube)
@@ -96,6 +96,7 @@
     cleanup_sys_modules(libconfig)
     if cubedir:
         config = DevCubeConfiguration(cube)
+        config.cleanup_interface_sobjects = False
     else:
         config = libconfig
         libconfig = None
--- a/devtools/testlib.py	Wed May 13 10:56:24 2009 +0200
+++ b/devtools/testlib.py	Wed May 13 11:02:47 2009 +0200
@@ -194,7 +194,7 @@
         else:
             self.set_description("testing %s, mod=%s (no rset)" % (vid, view.__module__))
         if template is None: # raw view testing, no template
-            viewfunc = view.dispatch
+            viewfunc = view.render
         else:
             templateview = self.vreg.select_view(template, req, rset, view=view, **kwargs)
             kwargs['view'] = view
@@ -249,9 +249,11 @@
         etypes = self.to_test_etypes()
         for etype in etypes:
             yield self.execute('Any X LIMIT %s WHERE X is %s' % (limit, etype))
-
         etype1 = etypes.pop()
-        etype2 = etypes.pop()
+        try:
+            etype2 = etypes.pop()
+        except KeyError:
+            etype2 = etype1
         # test a mixed query (DISTINCT/GROUP to avoid getting duplicate
         # X which make muledit view failing for instance (html validation fails
         # because of some duplicate "id" attributes)
@@ -327,7 +329,7 @@
         for action in self.list_actions_for(rset):
             yield InnerTest(self._testname(rset, action.id, 'action'), action.url)
         for box in self.list_boxes_for(rset):
-            yield InnerTest(self._testname(rset, box.id, 'box'), box.dispatch)
+            yield InnerTest(self._testname(rset, box.id, 'box'), box.render)
 
     @staticmethod
     def _testname(rset, objid, objtype):
--- a/web/views/editforms.py	Wed May 13 10:56:24 2009 +0200
+++ b/web/views/editforms.py	Wed May 13 11:02:47 2009 +0200
@@ -102,10 +102,11 @@
             if getattr(entity, rtype) is None:
                 value = default or self.req._('not specified')
             else:
-                value = entity.printable_value(rtype)
+                value = html_escape(entity.printable_value(rtype))
         else:
             rset = entity.related(rtype, role)
-            value = self.view(vid, rset, 'null') or default
+            # XXX html_escape but that depends of the actual vid
+            value = html_escape(self.view(vid, rset, 'null') or default)
         if not entity.has_perm('update'):
             self.w(value)
             return