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

Detect live tests and do some no-ops then.

parent c282af7c
...@@ -134,8 +134,15 @@ class testVifibMixin(ERP5TypeTestCase): ...@@ -134,8 +134,15 @@ class testVifibMixin(ERP5TypeTestCase):
user = uf.getUserById('default_user').__of__(uf) user = uf.getUserById('default_user').__of__(uf)
newSecurityManager(None, user) newSecurityManager(None, user)
def isLiveTest(self):
return 'ERP5TypeLiveTestCase' in [q.__name__ for q in self.__class__.mro()]
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['Vifib'].manage_addTool( self.portal.manage_addProduct['Vifib'].manage_addTool(
'ERP5 Certificate Authority Tool', None) 'ERP5 Certificate Authority Tool', None)
...@@ -256,6 +263,9 @@ class testVifibMixin(ERP5TypeTestCase): ...@@ -256,6 +263,9 @@ class testVifibMixin(ERP5TypeTestCase):
""" """
Manager has to create an administrator user first. Manager has to create an administrator user first.
""" """
if self.isLiveTest():
# nothing to do in Live Test
return
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