set self.rset else we're missing some stuff since TheMainTemplate instance as None as rset
authorsylvain.thenault@logilab.fr
Fri, 30 Jan 2009 17:24:53 +0100
changeset 535 ad9ac2169089
parent 534 1368c80276bc
child 536 781cd9fccbaa
set self.rset else we're missing some stuff since TheMainTemplate instance as None as rset
devtools/testlib.py
--- a/devtools/testlib.py	Fri Jan 30 15:32:02 2009 +0100
+++ b/devtools/testlib.py	Fri Jan 30 17:24:53 2009 +0100
@@ -206,7 +206,10 @@
         elif template == 'main':
             _select_view_and_rset = TheMainTemplate._select_view_and_rset
             # patch TheMainTemplate.process_rql to avoid recomputing resultset
-            TheMainTemplate._select_view_and_rset = lambda *a, **k: (view, rset)
+            def __select_view_and_rset(self, view=view, rset=rset):
+                self.rset = rset
+                return view, rset
+            TheMainTemplate._select_view_and_rset = __select_view_and_rset
         try:
             return self._test_view(viewfunc, view, template, **kwargs)
         finally: