Commit 963d2549 authored by Romain Courteaud's avatar Romain Courteaud Committed by Rafael Monnerat

slapos_cloud: drop _simulateScript/_dropScript

parent 9f43c3e1
...@@ -648,24 +648,6 @@ class SlapOSTestCaseMixin(testSlapOSMixin): ...@@ -648,24 +648,6 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
resource='foo/bar', resource='foo/bar',
) )
# Set of methods to help test alarms and to see if the script was called
def _simulateScript(self, script_name, fake_return=""):
if script_name in self.portal.portal_skins.custom.objectIds():
raise ValueError('Precondition failed: %s exists in custom' % script_name)
createZODBPythonScript(self.portal.portal_skins.custom,
script_name,
'*args, **kwargs',
'# Script body\n'
"""portal_workflow = context.portal_workflow
portal_workflow.doActionFor(context, action='edit_action', comment='Visited by %s')
return %s""" % (script_name, fake_return ))
transaction.commit()
def _dropScript(self, script_name):
if script_name in self.portal.portal_skins.custom.objectIds():
self.portal.portal_skins.custom.manage_delObjects(script_name)
transaction.commit()
def _test_alarm(self, alarm, document, script_name): def _test_alarm(self, alarm, document, script_name):
self.tic() self.tic()
with TemporaryAlarmScript(self.portal, script_name): with TemporaryAlarmScript(self.portal, script_name):
......
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