Commit d3047f40 authored by Rafael Monnerat's avatar Rafael Monnerat

Reuse local bt5 repository instead always use remote one.

This provides more accuracy on outcome, and makes development easy when
test changes.
parent d1d35052
...@@ -107,8 +107,20 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase): ...@@ -107,8 +107,20 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase):
self.restricted_security = 0 self.restricted_security = 0
# information to know if a business template is a standard business # information to know if a business template is a standard business
# template or a custom one # template or a custom one
public_bt5_repository_list = ['http://www.erp5.org/dists/snapshot/bt5/']
template_list = self._getBTPathAndIdList(["erp5_base"])
if len(template_list) > 0:
bt5_repository_path = "/".join(template_list[0][0].split("/")[:-1])
try:
self.portal.portal_templates.updateRepositoryBusinessTemplateList( self.portal.portal_templates.updateRepositoryBusinessTemplateList(
['http://www.erp5.org/dists/snapshot/bt5/']) [bt5_repository_path], None)
except (RuntimeError, IOError):
# If bt5 repository is not a repository use public one.
self.portal.portal_templates.updateRepositoryBusinessTemplateList(
public_bt5_repository_list)
else:
self.portal.portal_templates.updateRepositoryBusinessTemplateList(
public_bt5_repository_list)
# it is required by SecurityTestCase # it is required by SecurityTestCase
self.workflow_tool = self.portal.portal_workflow self.workflow_tool = self.portal.portal_workflow
......
...@@ -48,6 +48,21 @@ class TestZeleniumConfiguratorStandard(ERP5TypeFunctionalTestCase): ...@@ -48,6 +48,21 @@ class TestZeleniumConfiguratorStandard(ERP5TypeFunctionalTestCase):
configurator_zuite.manage_pasteObjects(cb_copy_data=clipboard) configurator_zuite.manage_pasteObjects(cb_copy_data=clipboard)
self.stepTic() self.stepTic()
public_bt5_repository_list = ['http://www.erp5.org/dists/snapshot/bt5/']
template_list = self._getBTPathAndIdList(["erp5_base"])
if len(template_list) > 0:
bt5_repository_path = "/".join(template_list[0][0].split("/")[:-1])
try:
self.portal.portal_templates.updateRepositoryBusinessTemplateList(
[bt5_repository_path], None)
except (RuntimeError, IOError):
# If bt5 repository is not a repository use public one.
self.portal.portal_templates.updateRepositoryBusinessTemplateList(
public_bt5_repository_list)
else:
self.portal.portal_templates.updateRepositoryBusinessTemplateList(
public_bt5_repository_list)
def afterSetUp(self): def afterSetUp(self):
self.setupVirtualTestZuite() self.setupVirtualTestZuite()
ERP5TypeFunctionalTestCase.afterSetUp(self) ERP5TypeFunctionalTestCase.afterSetUp(self)
......
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