Commit 9f43c3e1 authored by Romain Courteaud's avatar Romain Courteaud Committed by Rafael Monnerat

slapos_cloud: stop using _simulateScript

parent 06849930
......@@ -666,35 +666,23 @@ return %s""" % (script_name, fake_return ))
self.portal.portal_skins.custom.manage_delObjects(script_name)
transaction.commit()
def assertScriptVisited(self, document, script_name):
self.assertEqual(
'Visited by %s' % script_name,
document.workflow_history['edit_workflow'][-1]['comment'])
def assertScriptNotVisited(self, document, script_name):
self.assertNotEqual(
'Visited by %s' % script_name,
document.workflow_history['edit_workflow'][-1]['comment'])
def _test_alarm(self, alarm, document, script_name):
self.tic()
self._simulateScript(script_name)
try:
with TemporaryAlarmScript(self.portal, script_name):
alarm.activeSense()
self.tic()
finally:
self._dropScript(script_name)
self.assertScriptVisited(document, script_name)
self.assertEqual(
'Visited by %s' % script_name,
document.workflow_history['edit_workflow'][-1]['comment'])
def _test_alarm_not_visited(self, alarm, document, script_name):
self.tic()
self._simulateScript(script_name)
try:
with TemporaryAlarmScript(self.portal, script_name):
alarm.activeSense()
self.tic()
finally:
self._dropScript(script_name)
self.assertScriptNotVisited(document, script_name)
self.assertNotEqual(
'Visited by %s' % script_name,
document.workflow_history['edit_workflow'][-1]['comment'])
def restoreAccountingTemplatesOnPreferences(self):
self.login()
......
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