equal
deleted
inserted
replaced
13 |
13 |
14 from logilab.common.testlib import TestCase |
14 from logilab.common.testlib import TestCase |
15 from logilab.common.pytest import nocoverage |
15 from logilab.common.pytest import nocoverage |
16 from logilab.common.umessage import message_from_string |
16 from logilab.common.umessage import message_from_string |
17 |
17 |
18 from logilab.common.deprecation import deprecated_function |
18 from logilab.common.deprecation import deprecated |
19 |
19 |
20 from cubicweb.devtools import init_test_database, TestServerConfiguration, ApptestConfiguration |
20 from cubicweb.devtools import init_test_database, TestServerConfiguration, ApptestConfiguration |
21 from cubicweb.devtools._apptest import TestEnvironment |
21 from cubicweb.devtools._apptest import TestEnvironment |
22 from cubicweb.devtools.fake import FakeRequest |
22 from cubicweb.devtools.fake import FakeRequest |
23 |
23 |
232 |
232 |
233 def pactions_by_cats(self, req, rset, categories=('addrelated',)): |
233 def pactions_by_cats(self, req, rset, categories=('addrelated',)): |
234 return [(a.id, a.__class__) for a in self.vreg.possible_vobjects('actions', req, rset=rset) |
234 return [(a.id, a.__class__) for a in self.vreg.possible_vobjects('actions', req, rset=rset) |
235 if a.category in categories] |
235 if a.category in categories] |
236 |
236 |
237 paddrelactions = deprecated_function(pactions_by_cats) |
237 paddrelactions = deprecated()(pactions_by_cats) |
238 |
238 |
239 def pactionsdict(self, req, rset, skipcategories=('addrelated', 'siteactions', 'useractions')): |
239 def pactionsdict(self, req, rset, skipcategories=('addrelated', 'siteactions', 'useractions')): |
240 res = {} |
240 res = {} |
241 for a in self.vreg.possible_vobjects('actions', req, rset=rset): |
241 for a in self.vreg.possible_vobjects('actions', req, rset=rset): |
242 if a.category not in skipcategories: |
242 if a.category not in skipcategories: |