Commit 30d65069 authored by Łukasz Nowak's avatar Łukasz Nowak

Just like in real alarm, switch to super user.

parent 248eb9e8
...@@ -28,7 +28,8 @@ ...@@ -28,7 +28,8 @@
############################################################################## ##############################################################################
import transaction import transaction
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from AccessControl.SecurityManagement import newSecurityManager from AccessControl.SecurityManagement import newSecurityManager, \
getSecurityManager, setSecurityManager
from Products.ERP5Type.tests.utils import DummyMailHost from Products.ERP5Type.tests.utils import DummyMailHost
import os import os
from DateTime import DateTime from DateTime import DateTime
...@@ -334,8 +335,13 @@ class testVifibMixin(ERP5TypeTestCase): ...@@ -334,8 +335,13 @@ class testVifibMixin(ERP5TypeTestCase):
def stepTic(self, **kw): def stepTic(self, **kw):
def build(): def build():
sm = getSecurityManager()
self.login()
try:
if 'vifib_trigger_build' in self.portal.portal_alarms.objectIds(): if 'vifib_trigger_build' in self.portal.portal_alarms.objectIds():
self.portal.portal_alarms.vifib_trigger_build.Alarm_buildVifibPath() self.portal.portal_alarms.vifib_trigger_build.Alarm_buildVifibPath()
finally:
setSecurityManager(sm)
if kw.get('sequence', None) is None: if kw.get('sequence', None) is None:
# in case of using not in sequence commit transaction # in case of using not in sequence commit transaction
......
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