Commit b85a6b51 authored by Łukasz Nowak's avatar Łukasz Nowak

Subscribe alarm node in tests.

It is required to scripts like Alarm_safeTrigger which not trigger alarms if
alarm node has been disactivated.
parent 2b50ba10
...@@ -50,6 +50,7 @@ class testSlapOSMixin(Products.Vifib.tests.VifibMixin.testVifibMixin): ...@@ -50,6 +50,7 @@ class testSlapOSMixin(Products.Vifib.tests.VifibMixin.testVifibMixin):
transaction.commit() transaction.commit()
def bootstrapSite(self): def bootstrapSite(self):
self.setupPortalAlarms()
self.setupPortalCertificateAuthority() self.setupPortalCertificateAuthority()
self.setUpMemcached() self.setUpMemcached()
portal = self.getPortal() portal = self.getPortal()
......
...@@ -158,6 +158,11 @@ class testVifibMixin(ERP5TypeTestCase): ...@@ -158,6 +158,11 @@ class testVifibMixin(ERP5TypeTestCase):
if payzen.getServicePassword() == '': if payzen.getServicePassword() == '':
payzen.setServicePassword('09876') payzen.setServicePassword('09876')
def setupPortalAlarms(self):
if not self.portal.portal_alarms.isSubscribed():
self.portal.portal_alarms.subscribe()
self.assertTrue(self.portal.portal_alarms.isSubscribed())
def setupPortalCertificateAuthority(self): def setupPortalCertificateAuthority(self):
"""Sets up portal_certificate_authority""" """Sets up portal_certificate_authority"""
if not self.portal.hasObject('portal_certificate_authority'): if not self.portal.hasObject('portal_certificate_authority'):
...@@ -294,6 +299,7 @@ class testVifibMixin(ERP5TypeTestCase): ...@@ -294,6 +299,7 @@ class testVifibMixin(ERP5TypeTestCase):
if self.isLiveTest(): if self.isLiveTest():
# nothing to do in Live Test # nothing to do in Live Test
return return
self.setupPortalAlarms()
self.setupPortalCertificateAuthority() self.setupPortalCertificateAuthority()
self.setupPayZenInterface() self.setupPayZenInterface()
self.setUpMemcached() self.setUpMemcached()
......
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