Commit 09c26248 authored by Łukasz Nowak's avatar Łukasz Nowak

Setup things only once.

parent ff733d03
...@@ -33,8 +33,6 @@ import Products.Vifib.tests.VifibMixin ...@@ -33,8 +33,6 @@ import Products.Vifib.tests.VifibMixin
class testSlapOSMixin(Products.Vifib.tests.VifibMixin.testVifibMixin): class testSlapOSMixin(Products.Vifib.tests.VifibMixin.testVifibMixin):
def afterSetUp(self): def afterSetUp(self):
self.setupPortalCertificateAuthority()
self.setUpMemcached()
self.portal.portal_caches.erp5_site_global_id = '%s' % random.random() self.portal.portal_caches.erp5_site_global_id = '%s' % random.random()
self.portal.portal_caches._p_changed = 1 self.portal.portal_caches._p_changed = 1
transaction.commit() transaction.commit()
......
...@@ -164,10 +164,6 @@ class testVifibMixin(ERP5TypeTestCase): ...@@ -164,10 +164,6 @@ class testVifibMixin(ERP5TypeTestCase):
def setupPortalCertificateAuthority(self): def setupPortalCertificateAuthority(self):
"""Sets up portal_certificate_authority""" """Sets up portal_certificate_authority"""
if self.isLiveTest():
# nothing to do in case of being called as live test
return
if not self.portal.hasObject('portal_certificate_authority'): if not self.portal.hasObject('portal_certificate_authority'):
self.portal.manage_addProduct['ERP5'].manage_addTool( self.portal.manage_addProduct['ERP5'].manage_addTool(
'ERP5 Certificate Authority Tool', None) 'ERP5 Certificate Authority Tool', None)
...@@ -222,9 +218,6 @@ class testVifibMixin(ERP5TypeTestCase): ...@@ -222,9 +218,6 @@ class testVifibMixin(ERP5TypeTestCase):
self.portal.portal_alarms.vifib_check_consistency.newActiveProcess() self.portal.portal_alarms.vifib_check_consistency.newActiveProcess()
finally: finally:
setSecurityManager(sm) setSecurityManager(sm)
self.setupPortalCertificateAuthority()
self.setupPayZenInterface()
self.setUpMemcached()
import random import random
self.portal.portal_caches.erp5_site_global_id = '%s' % random.random() self.portal.portal_caches.erp5_site_global_id = '%s' % random.random()
self.portal.portal_caches._p_changed = 1 self.portal.portal_caches._p_changed = 1
...@@ -305,6 +298,9 @@ class testVifibMixin(ERP5TypeTestCase): ...@@ -305,6 +298,9 @@ class testVifibMixin(ERP5TypeTestCase):
if self.isLiveTest(): if self.isLiveTest():
# nothing to do in Live Test # nothing to do in Live Test
return return
self.setupPortalCertificateAuthority()
self.setupPayZenInterface()
self.setUpMemcached()
portal = self.getPortal() portal = self.getPortal()
if 'MailHost' in portal.objectIds(): if 'MailHost' in portal.objectIds():
portal.manage_delObjects(['MailHost']) portal.manage_delObjects(['MailHost'])
......
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