--- a/devtools/apptest.py Thu Apr 16 17:49:52 2009 +0200
+++ b/devtools/apptest.py Fri Apr 17 09:59:53 2009 +0200
@@ -14,6 +14,8 @@
from logilab.common.pytest import nocoverage
from logilab.common.umessage import message_from_string
+from logilab.common.deprecation import deprecated_function
+
from cubicweb.devtools import init_test_database, TestServerConfiguration, ApptestConfiguration
from cubicweb.devtools._apptest import TestEnvironment
from cubicweb.devtools.fake import FakeRequest
@@ -218,6 +220,13 @@
def pactions(self, req, rset, skipcategories=('addrelated', 'siteactions', 'useractions')):
return [(a.id, a.__class__) for a in self.vreg.possible_vobjects('actions', req, rset)
if a.category not in skipcategories]
+
+ def pactions_by_cats(self, req, rset, categories=('addrelated',)):
+ return [(a.id, a.__class__) for a in self.vreg.possible_vobjects('actions', req, rset)
+ if a.category in categories]
+
+ paddrelactions = deprecated_function(pactions_by_cats)
+
def pactionsdict(self, req, rset, skipcategories=('addrelated', 'siteactions', 'useractions')):
res = {}
for a in self.vreg.possible_vobjects('actions', req, rset):
@@ -225,14 +234,7 @@
res.setdefault(a.category, []).append(a.__class__)
return res
- def paddrelactions(self, req, rset):
- return [(a.id, a.__class__) for a in self.vreg.possible_vobjects('actions', req, rset)
- if a.category == 'addrelated']
-
- def pmainactions(self, req, rset):
- return [(a.id, a.__class__) for a in self.vreg.possible_vobjects('actions', req, rset)
- if a.category == 'mainactions']
-
+
def remote_call(self, fname, *args):
"""remote call simulation"""
dump = simplejson.dumps