Commit 2675c649 authored by Jérome Perrin's avatar Jérome Perrin

CMFActivity: don't use deprecated getCurrentNode

parent b9beb439
Pipeline #9669 failed with stage
in 0 seconds
......@@ -653,7 +653,7 @@ class ActivityTool (BaseTool):
manage_overview = DTMLFile( 'dtml/explainActivityTool', globals() )
security.declareProtected( CMFCorePermissions.ManagePortal , 'manageLoadBalancing' )
manageLoadBalancing = DTMLFile( 'dtml/manageLoadBalancing', globals() )
manageLoadBalancing = DTMLFile( 'dtml/manageLoadBalancing', globals(), _getCurrentNode=getCurrentNode)
distributingNode = ''
_nodes = ()
......
......@@ -82,8 +82,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
</td>
</tr>
<tr>
<td>Current node is <b><dtml-var getCurrentNode></b></td>
<dtml-if expr="getCurrentNode() not in getNodeList()">
<td>Current node is <b><dtml-var _getCurrentNode></b></td>
<dtml-if expr="_getCurrentNode() not in getNodeList()">
<td align="left" valign="top" colspan=2>
<p style="color: #F00"><b>Warning: Current node is not known to distribution system.</b></p>
<p>
......
......@@ -27,7 +27,7 @@
##############################################################################
import inspect
import unittest
import warnings
from functools import wraps
from itertools import product
from Products.ERP5Type.tests.utils import LogInterceptor
......@@ -2656,8 +2656,11 @@ return [x.getObject() for x in context.portal_catalog(limit=100)]
[message],
)
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestCMFActivity))
return suite
def test_zmi_views(self):
# we can render ZMI view without errors or warnings
with warnings.catch_warnings(record=True) as catched_warnings:
self.portal.portal_activities.manage_overview()
self.portal.portal_activities.manageActivities()
self.portal.portal_activities.manageActivitiesAdvanced()
self.portal.portal_activities.manageLoadBalancing()
self.assertEqual(catched_warnings, [])
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment