devtools/testlib.py
changeset 535 ad9ac2169089
parent 534 1368c80276bc
child 549 cd2bdcc16430
--- 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: