diff -r f94b41709ce6 -r b056a49c16dc devtools/apptest.py --- a/devtools/apptest.py Fri Apr 24 16:48:38 2009 +0200 +++ b/devtools/apptest.py Fri Apr 24 17:04:14 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,10 +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 remote_call(self, fname, *args): """remote call simulation""" dump = simplejson.dumps