Commit 6ee4f39d authored by Rafael Monnerat's avatar Rafael Monnerat

tests: Don't invoke Certificate Setup if you are not on test environment

parent dc2fef14
...@@ -73,6 +73,9 @@ class testSlapOSMixin(ERP5TypeTestCase): ...@@ -73,6 +73,9 @@ class testSlapOSMixin(ERP5TypeTestCase):
def createCertificateAuthorityFile(self): def createCertificateAuthorityFile(self):
"""Sets up portal_certificate_authority""" """Sets up portal_certificate_authority"""
if 'TEST_CA_PATH' not in os.environ:
return
ca_path = os.path.join(os.environ['TEST_CA_PATH'], ca_path = os.path.join(os.environ['TEST_CA_PATH'],
self.__class__.__name__) self.__class__.__name__)
...@@ -184,6 +187,7 @@ class testSlapOSMixin(ERP5TypeTestCase): ...@@ -184,6 +187,7 @@ class testSlapOSMixin(ERP5TypeTestCase):
config.product_config["initsite"] = initsite config.product_config["initsite"] = initsite
self.createCertificateAuthorityFile()
if not getattr(self.portal, 'is_site_bootstrapped', 0): if not getattr(self.portal, 'is_site_bootstrapped', 0):
self.portal.is_site_bootstrapped = 1 self.portal.is_site_bootstrapped = 1
self.bootstrapSite() self.bootstrapSite()
......
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