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
self.portal.portal_templates.updateRepositoryBusinessTemplateList( public_bt5_repository_list = ['http://www.erp5.org/dists/snapshot/bt5/']
['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)
# it is required by SecurityTestCase # it is required by SecurityTestCase
self.workflow_tool = self.portal.portal_workflow self.workflow_tool = self.portal.portal_workflow
......
...@@ -47,6 +47,21 @@ class TestZeleniumConfiguratorStandard(ERP5TypeFunctionalTestCase): ...@@ -47,6 +47,21 @@ class TestZeleniumConfiguratorStandard(ERP5TypeFunctionalTestCase):
clipboard = portal_tests.manage_copyObjects(ids=['user_tutorial_zuite']) clipboard = portal_tests.manage_copyObjects(ids=['user_tutorial_zuite'])
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()
......
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