diff --git a/product/ERP5Configurator/tests/ConfiguratorTestMixin.py b/product/ERP5Configurator/tests/ConfiguratorTestMixin.py
index a8db91bd60785ebcdd60e7516ff220c4647792da..4fd4d89d44385d9e3a34f922f69aa0b9e2278bd8 100644
--- a/product/ERP5Configurator/tests/ConfiguratorTestMixin.py
+++ b/product/ERP5Configurator/tests/ConfiguratorTestMixin.py
@@ -107,8 +107,20 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase):
     self.restricted_security = 0
     # information to know if a business template is a standard business
     # template or a custom one
-    self.portal.portal_templates.updateRepositoryBusinessTemplateList(
-                                    ['http://www.erp5.org/dists/snapshot/bt5/'])
+    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)
 
     # it is required by SecurityTestCase
     self.workflow_tool = self.portal.portal_workflow
diff --git a/product/ERP5Configurator/tests/testFunctionalConfigurator.py b/product/ERP5Configurator/tests/testFunctionalConfigurator.py
index 628720d6b8ca8b0edd5d95b1629dda31f1e6f993..04072eefe57ee88fd23522885cb4ac0ac84fcb22 100755
--- a/product/ERP5Configurator/tests/testFunctionalConfigurator.py
+++ b/product/ERP5Configurator/tests/testFunctionalConfigurator.py
@@ -47,6 +47,21 @@ class TestZeleniumConfiguratorStandard(ERP5TypeFunctionalTestCase):
       clipboard = portal_tests.manage_copyObjects(ids=['user_tutorial_zuite'])
       configurator_zuite.manage_pasteObjects(cb_copy_data=clipboard)
       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):
     self.setupVirtualTestZuite()