Commit 1d7546cb authored by Arnaud Fontaine's avatar Arnaud Fontaine

ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components'...

ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' (a771dca4) to fix tests bootstrap.

The new syntax to load ZODB Tests Components is:
runUnitTest BT_TITLE:TEST_NAME

That commit was too adhoc as it was relying upon filesystem to load Tests
Components and was not behaving like any other Components (versions was not
available and other Components were not importable).

At the end, it would have meant that a Test Component ran through runUnitTest
and Live Tests (in ERP5 itself) would have behaved differently, thus instead:

1/ Install BT_TITLE dependencies and its test dependencies (new bt property to
   specify bt to be installed only for tests on a fresh instance).
2/ The site is loaded.
3/ Load the test by importing it like any other Components.
parent 55fabe2c
...@@ -10,9 +10,6 @@ class TestERP5BearerToken(ERP5TypeTestCase): ...@@ -10,9 +10,6 @@ class TestERP5BearerToken(ERP5TypeTestCase):
test_token_extraction_id = 'bearer_test_extraction' test_token_extraction_id = 'bearer_test_extraction'
def getBusinessTemplateList(self):
return ('erp5_base', 'erp5_bearer_token')
def generateNewId(self): def generateNewId(self):
return str(self.portal.portal_ids.generateNewId( return str(self.portal.portal_ids.generateNewId(
id_group=('bearer_token_test_id'))) id_group=('bearer_token_test_id')))
......
2013-09-08 arnaud.fontaine
* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
2013-09-03 arnaud.fontaine 2013-09-03 arnaud.fontaine
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers. * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
13 14
\ No newline at end of file \ No newline at end of file
erp5_full_text_myisam_catalog
\ No newline at end of file
...@@ -66,14 +66,6 @@ class TestMaxmaDemoConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin): ...@@ -66,14 +66,6 @@ class TestMaxmaDemoConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
'erp5_l10n_pt-BR', 'erp5_l10n_pt-BR',
'erp5_demo_maxma_rule') 'erp5_demo_maxma_rule')
def getBusinessTemplateList(self):
return ('erp5_core_proxy_field_legacy',
'erp5_full_text_myisam_catalog',
'erp5_base',
'erp5_workflow',
'erp5_configurator',
'erp5_configurator_maxma_demo',)
def stepCreateBusinessConfiguration(self, sequence=None,\ def stepCreateBusinessConfiguration(self, sequence=None,\
sequence_list=None, **kw): sequence_list=None, **kw):
""" Create one Business Configuration """ """ Create one Business Configuration """
......
2013-09-08 arnaud.fontaine
* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
2013-09-03 arnaud.fontaine 2013-09-03 arnaud.fontaine
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers. * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
29 30
\ No newline at end of file \ No newline at end of file
erp5_core_proxy_field_legacy
erp5_full_text_myisam_catalog
erp5_base
erp5_workflow
\ No newline at end of file
...@@ -84,14 +84,6 @@ class TestRunMyDocsConfiguratorWorkflowMixin(TestLiveConfiguratorWorkflowMixin): ...@@ -84,14 +84,6 @@ class TestRunMyDocsConfiguratorWorkflowMixin(TestLiveConfiguratorWorkflowMixin):
stepCheckKnowledgePadRole stepCheckKnowledgePadRole
""" """
def getBusinessTemplateList(self):
return ('erp5_core_proxy_field_legacy',
'erp5_full_text_myisam_catalog',
'erp5_base',
'erp5_workflow',
'erp5_configurator',
'erp5_configurator_run_my_doc',)
def stepCreateBusinessConfiguration(self, sequence=None, sequence_list=None, **kw): def stepCreateBusinessConfiguration(self, sequence=None, sequence_list=None, **kw):
""" Create one Business Configuration """ """ Create one Business Configuration """
module = self.portal.business_configuration_module module = self.portal.business_configuration_module
......
2013-09-08 arnaud.fontaine
* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
2013-09-03 arnaud.fontaine 2013-09-03 arnaud.fontaine
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers. * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
11 12
\ No newline at end of file \ No newline at end of file
erp5_core_proxy_field_legacy
erp5_full_text_myisam_catalog
erp5_base
erp5_workflow
\ No newline at end of file
2013-09-08 arnaud.fontaine
* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
2013-09-03 arnaud.fontaine 2013-09-03 arnaud.fontaine
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers. * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
667 668
\ No newline at end of file \ No newline at end of file
erp5_full_text_myisam_catalog
\ No newline at end of file
...@@ -104,14 +104,6 @@ class TestUNGConfiguratorWorkflowMixin(TestLiveConfiguratorWorkflowMixin): ...@@ -104,14 +104,6 @@ class TestUNGConfiguratorWorkflowMixin(TestLiveConfiguratorWorkflowMixin):
stepCheckCreateNewEvent stepCheckCreateNewEvent
""" """
def getBusinessTemplateList(self):
return ('erp5_core_proxy_field_legacy',
'erp5_full_text_myisam_catalog',
'erp5_base',
'erp5_workflow',
'erp5_configurator',
'erp5_configurator_ung',)
def stepCreateBusinessConfiguration(self, sequence=None, sequence_list=None, **kw): def stepCreateBusinessConfiguration(self, sequence=None, sequence_list=None, **kw):
""" Create one Business Configuration """ """ Create one Business Configuration """
module = self.portal.business_configuration_module module = self.portal.business_configuration_module
......
2013-09-08 arnaud.fontaine
* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
2013-09-03 arnaud.fontaine 2013-09-03 arnaud.fontaine
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers. * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
61 62
\ No newline at end of file \ No newline at end of file
erp5_core_proxy_field_legacy
erp5_full_text_myisam_catalog
erp5_base
erp5_workflow
\ No newline at end of file
...@@ -110,10 +110,6 @@ class TestEGovMixin(SecurityTestCase): ...@@ -110,10 +110,6 @@ class TestEGovMixin(SecurityTestCase):
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self, quiet=quiet) sequence_list.play(self, quiet=quiet)
def getBusinessTemplateList(self):
"""return list of business templates to be installed. """
return ( 'erp5_base',)
def afterSetUp(self): def afterSetUp(self):
""" """
Method called before the launch of the test to initialize some data Method called before the launch of the test to initialize some data
......
2013-09-08 arnaud.fontaine
* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
2013-09-03 arnaud.fontaine 2013-09-03 arnaud.fontaine
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers. * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
764 765
\ No newline at end of file \ No newline at end of file
...@@ -9,19 +9,6 @@ class TestDiscussionThread(SecurityTestCase): ...@@ -9,19 +9,6 @@ class TestDiscussionThread(SecurityTestCase):
def getTitle(self): def getTitle(self):
return "TestDiscussionThread" return "TestDiscussionThread"
def getBusinessTemplateList(self):
"""
A tuple of Business Templates names to specify the dependencies we need to
install.
"""
return (
'erp5_base',
'erp5_web',
'erp5_ingestion_mysql_innodb_catalog',
'erp5_ingestion',
'erp5_dms',
'erp5_forum_tutorial')
def setUpOnce(self): def setUpOnce(self):
""" """
Create users to interact with the discussion forums Create users to interact with the discussion forums
......
2013-09-08 arnaud.fontaine
* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
2013-09-03 arnaud.fontaine 2013-09-03 arnaud.fontaine
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers. * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
7 8
\ No newline at end of file \ No newline at end of file
erp5_full_text_myisam_catalog
erp5_base
erp5_web
erp5_ingestion_mysql_innodb_catalog
erp5_ingestion
\ No newline at end of file
...@@ -54,17 +54,6 @@ class TestIngestion(ERP5TypeLiveTestCase): ...@@ -54,17 +54,6 @@ class TestIngestion(ERP5TypeLiveTestCase):
""" """
return "ERP5 Live DMS - URL Ingestion" return "ERP5 Live DMS - URL Ingestion"
def getBusinessTemplateList(self):
"""
Return the list of required business templates.
"""
return ('erp5_base',
'erp5_ingestion',
'erp5_ingestion_mysql_innodb_catalog',
'erp5_web',
'erp5_crm',
'erp5_dms')
def afterSetUp(self): def afterSetUp(self):
""" """
Initialize the ERP5 site. Initialize the ERP5 site.
......
2013-09-08 arnaud.fontaine
* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
2013-09-03 arnaud.fontaine 2013-09-03 arnaud.fontaine
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers. * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
148 149
\ No newline at end of file \ No newline at end of file
erp5_full_text_myisam_catalog
erp5_ingestion_mysql_innodb_catalog
erp5_web
erp5_crm
erp5_dms
\ No newline at end of file
...@@ -33,10 +33,6 @@ from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase ...@@ -33,10 +33,6 @@ from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5.ERP5Site import addERP5Tool from Products.ERP5.ERP5Site import addERP5Tool
class TestInotifyTool(ERP5TypeTestCase): class TestInotifyTool(ERP5TypeTestCase):
def getBusinessTemplateList(self):
return "erp5_core_proxy_field_legacy", "erp5_inotify"
def test_inotify(self): def test_inotify(self):
from Products.ERP5.Tool.InotifyTool import IN_CREATE, IN_MODIFY, IN_DELETE from Products.ERP5.Tool.InotifyTool import IN_CREATE, IN_MODIFY, IN_DELETE
addERP5Tool(self.portal, 'portal_inotify', 'Inotify Tool') addERP5Tool(self.portal, 'portal_inotify', 'Inotify Tool')
......
5 6
\ No newline at end of file \ No newline at end of file
erp5_core_proxy_field_legacy
\ No newline at end of file
...@@ -55,10 +55,6 @@ SOAPBinding.registerServiceClass(HelloWorldService) ...@@ -55,10 +55,6 @@ SOAPBinding.registerServiceClass(HelloWorldService)
class TestSoapBinding(ERP5TypeTestCase): class TestSoapBinding(ERP5TypeTestCase):
def getBusinessTemplateList(self):
return 'erp5_interfaces',
def createBinding(self, target_namespace, service_class): def createBinding(self, target_namespace, service_class):
return self.portal.portal_interfaces.newContent( return self.portal.portal_interfaces.newContent(
self._testMethodName, 'SOAP Binding', self._testMethodName, 'SOAP Binding',
......
4 5
\ No newline at end of file \ No newline at end of file
...@@ -35,12 +35,7 @@ import unittest ...@@ -35,12 +35,7 @@ import unittest
from Products.ERP5Type.tests.prepareFunctionalTest import TestZelenium from Products.ERP5Type.tests.prepareFunctionalTest import TestZelenium
class MobileTestZelenium(TestZelenium): class MobileTestZelenium(TestZelenium):
def getBusinessTemplateList(self): pass
"""
Return the list of business templates.
"""
return ('erp5_base', 'erp5_ui_test_core', 'erp5_ui_test',
'erp5_mobile', 'erp5_mobile_ui_test',)
def test_suite(): def test_suite():
suite = unittest.TestSuite() suite = unittest.TestSuite()
......
2013-09-08 arnaud.fontaine
* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
2013-09-03 arnaud.fontaine 2013-09-03 arnaud.fontaine
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers. * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
erp5_ui_test erp5_ui_test
erp5_mobile
\ No newline at end of file
12 13
\ No newline at end of file \ No newline at end of file
...@@ -40,14 +40,6 @@ class TestERP5PaypalSecurePaymentMixin(ERP5TypeTestCase): ...@@ -40,14 +40,6 @@ class TestERP5PaypalSecurePaymentMixin(ERP5TypeTestCase):
def getTitle(self): def getTitle(self):
return "ERP5 Paypal Secure Payment" return "ERP5 Paypal Secure Payment"
def getBusinessTemplateList(self):
"""
Tuple of Business Templates we need to install
"""
return ('erp5_base',
'erp5_secure_payment',
'erp5_paypal_secure_payment')
def afterSetUp(self): def afterSetUp(self):
self.portal = self.getPortalObject() self.portal = self.getPortalObject()
if not self.portal.hasObject('portal_secure_payments'): if not self.portal.hasObject('portal_secure_payments'):
......
2013-09-08 arnaud.fontaine
* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
2013-09-03 arnaud.fontaine 2013-09-03 arnaud.fontaine
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers. * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
9 10
\ No newline at end of file \ No newline at end of file
erp5_full_text_myisam_catalog
\ No newline at end of file
...@@ -41,14 +41,6 @@ class TestERP5PayzenSecurePaymentMixin(ERP5TypeTestCase): ...@@ -41,14 +41,6 @@ class TestERP5PayzenSecurePaymentMixin(ERP5TypeTestCase):
def getTitle(self): def getTitle(self):
return "ERP5 Payzen Secure Payment" return "ERP5 Payzen Secure Payment"
def getBusinessTemplateList(self):
"""
Tuple of Business Templates we need to install
"""
return ('erp5_base'
, 'erp5_secure_payment'
, 'erp5_payzen_secure_payment')
def afterSetUp(self): def afterSetUp(self):
self.portal = self.getPortalObject() self.portal = self.getPortalObject()
if not self.portal.hasObject('portal_secure_payments'): if not self.portal.hasObject('portal_secure_payments'):
......
2013-09-08 arnaud.fontaine
* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
2013-09-03 arnaud.fontaine 2013-09-03 arnaud.fontaine
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers. * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
52 53
\ No newline at end of file \ No newline at end of file
erp5_full_text_myisam_catalog
\ No newline at end of file
erp5_full_text_myisam_catalog
erp5_base
erp5_web
erp5_ingestion
erp5_dms
\ No newline at end of file
...@@ -28,16 +28,6 @@ def makeFileUpload(name, as_name=None): ...@@ -28,16 +28,6 @@ def makeFileUpload(name, as_name=None):
return FileUpload(path, as_name) return FileUpload(path, as_name)
class TestSafeImage(ERP5TypeTestCase): class TestSafeImage(ERP5TypeTestCase):
def getBusinessTemplateList(self):
return ('erp5_base',
'erp5_web',
'erp5_ingestion_mysql_innodb_catalog',
'erp5_ingestion',
'erp5_dms',
'erp5_safeimage'
)
def afterSetUp(self): def afterSetUp(self):
portal = self.getPortalObject() portal = self.getPortalObject()
self.image_module = self.portal.getDefaultModule(portal_type = 'Image Module') self.image_module = self.portal.getDefaultModule(portal_type = 'Image Module')
......
erp5_base
erp5_web
erp5_dms
\ No newline at end of file
14 15
\ No newline at end of file \ No newline at end of file
erp5_full_text_myisam_catalog
erp5_ingestion_mysql_innodb_catalog
erp5_ingestion
\ No newline at end of file
...@@ -34,9 +34,6 @@ from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase ...@@ -34,9 +34,6 @@ from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
class TestERP5SocialContracts(ERP5TypeTestCase): class TestERP5SocialContracts(ERP5TypeTestCase):
"""Test for erp5_social_contracts business template. """Test for erp5_social_contracts business template.
""" """
def getBusinessTemplateList(self):
return ('erp5_base', 'erp5_social_contracts', )
def afterSetUp(self): def afterSetUp(self):
self.person_1 = self.portal.person_module.newContent( self.person_1 = self.portal.person_module.newContent(
portal_type='Person', portal_type='Person',
......
2013-09-08 arnaud.fontaine
* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
2013-09-03 arnaud.fontaine 2013-09-03 arnaud.fontaine
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers. * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
28 29
\ No newline at end of file \ No newline at end of file
erp5_full_text_myisam_catalog
\ No newline at end of file
...@@ -37,12 +37,6 @@ class testSyncMLAsynchronousEngine(TestERP5SyncMLMixin): ...@@ -37,12 +37,6 @@ class testSyncMLAsynchronousEngine(TestERP5SyncMLMixin):
def getTitle(self): def getTitle(self):
return "Test SyncML with asynchronous engine" return "Test SyncML with asynchronous engine"
def getBusinessTemplateList(self):
"""
Tuple of Business Templates we need to install
"""
return ('erp5_base', 'erp5_syncml', 'erp5_syncml_test_data') # bt5 for test data
def afterSetUp(self): def afterSetUp(self):
""" """
This is ran before anything, used to set the environment This is ran before anything, used to set the environment
......
2013-09-08 arnaud.fontaine
* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
2013-09-03 arnaud.fontaine 2013-09-03 arnaud.fontaine
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers. * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
erp5_syncml erp5_syncml
erp5_base
\ No newline at end of file
5 6
\ No newline at end of file \ No newline at end of file
erp5_full_text_myisam_catalog
\ No newline at end of file
erp5_full_text_myisam_catalog
erp5_base
\ No newline at end of file
...@@ -36,21 +36,6 @@ class ShaCacheMixin(object): ...@@ -36,21 +36,6 @@ class ShaCacheMixin(object):
""" """
ShaCache - Mixin Class ShaCache - Mixin Class
""" """
def getBusinessTemplateList(self):
"""
Return the list of required business templates.
"""
return ('erp5_full_text_myisam_catalog',
'erp5_base',
'erp5_jquery',
'erp5_ingestion_mysql_innodb_catalog',
'erp5_ingestion',
'erp5_web',
'erp5_dms',
'erp5_web_download_theme',
'erp5_web_shacache',)
def afterSetUp(self): def afterSetUp(self):
""" """
Initialize the ERP5 site. Initialize the ERP5 site.
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
import httplib import httplib
import urlparse import urlparse
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from ShaCacheMixin import ShaCacheMixin from erp5.component.test.ShaCacheMixin import ShaCacheMixin
from Products.ERP5Type.tests.backportUnittest import expectedFailure from Products.ERP5Type.tests.backportUnittest import expectedFailure
class TestShaCache(ShaCacheMixin, ERP5TypeTestCase): class TestShaCache(ShaCacheMixin, ERP5TypeTestCase):
......
2013-09-08 arnaud.fontaine
* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
2013-09-03 arnaud.fontaine 2013-09-03 arnaud.fontaine
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers. * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
68 69
\ No newline at end of file \ No newline at end of file
erp5_full_text_myisam_catalog
\ No newline at end of file
...@@ -39,25 +39,6 @@ class ShaDirMixin(object): ...@@ -39,25 +39,6 @@ class ShaDirMixin(object):
""" """
ShaDir - Mixin Class ShaDir - Mixin Class
""" """
def getBusinessTemplateList(self):
"""
Return the list of required business templates.
"""
return ('erp5_full_text_myisam_catalog',
'erp5_base',
'erp5_jquery',
'erp5_ingestion_mysql_innodb_catalog',
'erp5_ingestion',
'erp5_web',
'erp5_dms',
'erp5_pdm',
'erp5_data_set',
'erp5_web_download_theme',
'erp5_web_shacache',
'erp5_web_shadir',)
def afterSetUp(self): def afterSetUp(self):
""" """
Initialize the ERP5 site. Initialize the ERP5 site.
......
...@@ -33,7 +33,7 @@ import urlparse ...@@ -33,7 +33,7 @@ import urlparse
import json import json
import random import random
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from ShaDirMixin import ShaDirMixin from erp5.component.test.ShaDirMixin import ShaDirMixin
from Products.ERP5Type.tests.backportUnittest import expectedFailure from Products.ERP5Type.tests.backportUnittest import expectedFailure
class TestShaDir(ShaDirMixin, ERP5TypeTestCase): class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
......
2013-09-08 arnaud.fontaine
* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
2013-09-03 arnaud.fontaine 2013-09-03 arnaud.fontaine
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers. * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
75 76
\ No newline at end of file \ No newline at end of file
erp5_full_text_myisam_catalog
erp5_base
erp5_jquery
erp5_ingestion_mysql_innodb_catalog
erp5_ingestion
erp5_web
erp5_dms
erp5_pdm
\ No newline at end of file
2013-09-08 arnaud.fontaine
* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
2011-08-04 gabriel.oliveira 2011-08-04 gabriel.oliveira
* Export knowledge pad and gadget preserving its state * Export knowledge pad and gadget preserving its state
......
53 54
\ No newline at end of file \ No newline at end of file
erp5_full_text_myisam_catalog
\ No newline at end of file
...@@ -38,37 +38,6 @@ class TestUNGSecurity(ERP5TypeTestCase): ...@@ -38,37 +38,6 @@ class TestUNGSecurity(ERP5TypeTestCase):
def getTitle(self): def getTitle(self):
return "Test UNG Security" return "Test UNG Security"
def getBusinessTemplateList(self):
"""Tuple of Business Templates we need to install"""
return ('erp5_base',
'erp5_web',
'erp5_ingestion_mysql_innodb_catalog',
'erp5_core_proxy_field_legacy',
'erp5_jquery',
'erp5_jquery_ui',
'erp5_ingestion',
'erp5_dms',
'erp5_crm',
'erp5_knowledge_pad',
'erp5_jquery_plugin_spinbtn',
'erp5_jquery_plugin_jgraduate',
'erp5_jquery_plugin_svgicon',
'erp5_jquery_plugin_hotkey',
'erp5_jquery_plugin_jquerybbq',
'erp5_jquery_plugin_svg_editor',
'erp5_jquery_plugin_sheet',
'erp5_jquery_plugin_mbmenu',
'erp5_jquery_plugin_jqchart',
'erp5_jquery_plugin_colorpicker',
'erp5_jquery_plugin_elastic',
'erp5_jquery_plugin_wdcalendar',
'erp5_jquery_sheet_editor',
'erp5_xinha_editor',
'erp5_svg_editor',
'erp5_web_ung_core',
'erp5_web_ung_theme',
'erp5_web_ung_role')
def beforeTearDown(self): def beforeTearDown(self):
person_module = self.getPersonModule() person_module = self.getPersonModule()
person_module.manage_delObjects(list(person_module.objectIds())) person_module.manage_delObjects(list(person_module.objectIds()))
......
2013-09-08 arnaud.fontaine
* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
2013-09-03 arnaud.fontaine 2013-09-03 arnaud.fontaine
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers. * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
36 37
\ No newline at end of file \ No newline at end of file
erp5_full_text_myisam_catalog
erp5_base
erp5_web
erp5_ingestion_mysql_innodb_catalog
erp5_core_proxy_field_legacy
erp5_jquery
erp5_jquery_ui
erp5_ingestion
erp5_dms
erp5_crm
erp5_knowledge_pad
erp5_jquery_plugin_spinbtn
erp5_jquery_plugin_jgraduate
erp5_jquery_plugin_svgicon
erp5_jquery_plugin_hotkey
erp5_jquery_plugin_jquerybbq
erp5_jquery_plugin_svg_editor
erp5_jquery_plugin_sheet
erp5_jquery_plugin_mbmenu
erp5_jquery_plugin_jqchart
erp5_jquery_plugin_colorpicker
erp5_jquery_plugin_elastic
erp5_jquery_plugin_wdcalendar
erp5_jquery_sheet_editor
erp5_xinha_editor
erp5_svg_editor
erp5_web_ung_core
\ No newline at end of file
...@@ -44,36 +44,6 @@ class TestUNG(ERP5TypeTestCase): ...@@ -44,36 +44,6 @@ class TestUNG(ERP5TypeTestCase):
def getTitle(self): def getTitle(self):
return "UNG Tests" return "UNG Tests"
def getBusinessTemplateList(self):
return ('erp5_ingestion_mysql_innodb_catalog',
'erp5_full_text_myisam_catalog',
'erp5_base',
'erp5_jquery',
'erp5_web',
'erp5_core_proxy_field_legacy',
'erp5_ingestion',
'erp5_jquery_ui',
'erp5_dms',
'erp5_crm',
'erp5_knowledge_pad',
'erp5_jquery_plugin_spinbtn',
'erp5_jquery_plugin_jgraduate',
'erp5_jquery_plugin_svgicon',
'erp5_jquery_plugin_hotkey',
'erp5_jquery_plugin_jquerybbq',
'erp5_jquery_plugin_svg_editor',
'erp5_jquery_plugin_sheet',
'erp5_jquery_plugin_mbmenu',
'erp5_jquery_plugin_jqchart',
'erp5_jquery_plugin_colorpicker',
'erp5_jquery_plugin_elastic',
'erp5_jquery_plugin_wdcalendar',
'erp5_jquery_sheet_editor',
'erp5_xinha_editor',
'erp5_svg_editor',
'erp5_web_ung_core',
'erp5_web_ung_theme',)
def afterSetUp(self): def afterSetUp(self):
"""Clean up form""" """Clean up form"""
self.portal.REQUEST.form.clear() self.portal.REQUEST.form.clear()
......
2013-09-08 arnaud.fontaine
* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
2013-09-03 arnaud.fontaine 2013-09-03 arnaud.fontaine
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers. * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
415 416
\ No newline at end of file \ No newline at end of file
erp5_ingestion_mysql_innodb_catalog
erp5_full_text_myisam_catalog
erp5_base
erp5_jquery
erp5_web
erp5_core_proxy_field_legacy
erp5_ingestion
erp5_jquery_ui
erp5_dms
erp5_crm
erp5_knowledge_pad
erp5_jquery_plugin_spinbtn
erp5_jquery_plugin_jgraduate
erp5_jquery_plugin_svgicon
erp5_jquery_plugin_hotkey
erp5_jquery_plugin_jquerybbq
erp5_jquery_plugin_svg_editor
erp5_jquery_plugin_sheet
erp5_jquery_plugin_mbmenu
erp5_jquery_plugin_jqchart
erp5_jquery_plugin_colorpicker
erp5_jquery_plugin_elastic
erp5_jquery_plugin_wdcalendar
erp5_jquery_sheet_editor
erp5_xinha_editor
erp5_svg_editor
erp5_web_ung_theme
\ No newline at end of file
...@@ -32,8 +32,8 @@ import base64 ...@@ -32,8 +32,8 @@ import base64
import httplib import httplib
from DateTime import DateTime from DateTime import DateTime
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from ShaCacheMixin import ShaCacheMixin from erp5.component.test.ShaCacheMixin import ShaCacheMixin
from ShaSecurityMixin import ShaSecurityMixin from erp5.component.test.ShaSecurityMixin import ShaSecurityMixin
from Products.ERP5Type.tests.backportUnittest import expectedFailure from Products.ERP5Type.tests.backportUnittest import expectedFailure
class TestShaCacheExternal(ShaCacheMixin, ShaSecurityMixin, ERP5TypeTestCase): class TestShaCacheExternal(ShaCacheMixin, ShaSecurityMixin, ERP5TypeTestCase):
...@@ -48,14 +48,6 @@ class TestShaCacheExternal(ShaCacheMixin, ShaSecurityMixin, ERP5TypeTestCase): ...@@ -48,14 +48,6 @@ class TestShaCacheExternal(ShaCacheMixin, ShaSecurityMixin, ERP5TypeTestCase):
""" """
return "SHACACHE External - Real Usage Of ShaCache" return "SHACACHE External - Real Usage Of ShaCache"
def getBusinessTemplateList(self):
"""
Return the list of required business templates.
"""
return ShaCacheMixin().getBusinessTemplateList() + \
('erp5_data_set',
'networkcache_erp5',)
def afterSetUp(self): def afterSetUp(self):
""" """
Initialize the ERP5 site. Initialize the ERP5 site.
......
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
from AccessControl import Unauthorized from AccessControl import Unauthorized
from Products.ERP5Type.tests.SecurityTestCase import SecurityTestCase from Products.ERP5Type.tests.SecurityTestCase import SecurityTestCase
from ShaCacheMixin import ShaCacheMixin from erp5.component.test.ShaCacheMixin import ShaCacheMixin
from ShaSecurityMixin import ShaSecurityMixin from erp5.component.test.ShaSecurityMixin import ShaSecurityMixin
class TestShaCacheSecurity(ShaCacheMixin, ShaSecurityMixin, SecurityTestCase): class TestShaCacheSecurity(ShaCacheMixin, ShaSecurityMixin, SecurityTestCase):
...@@ -45,16 +45,6 @@ class TestShaCacheSecurity(ShaCacheMixin, ShaSecurityMixin, SecurityTestCase): ...@@ -45,16 +45,6 @@ class TestShaCacheSecurity(ShaCacheMixin, ShaSecurityMixin, SecurityTestCase):
""" """
return "SHADIR Security Test Case" return "SHADIR Security Test Case"
def getBusinessTemplateList(self):
"""
Return the list of required business templates.
"""
return ShaCacheMixin().getBusinessTemplateList() + \
('erp5_pdm',
'erp5_data_set',
'erp5_web_shadir',
'networkcache_erp5',)
def afterSetUp(self): def afterSetUp(self):
""" """
Initialize the ERP5 site. Initialize the ERP5 site.
......
...@@ -34,8 +34,8 @@ import os ...@@ -34,8 +34,8 @@ import os
import httplib import httplib
from DateTime import DateTime from DateTime import DateTime
from Products.ERP5Type.tests.ERP5TypeLiveTestCase import ERP5TypeTestCase from Products.ERP5Type.tests.ERP5TypeLiveTestCase import ERP5TypeTestCase
from ShaDirMixin import ShaDirMixin from erp5.component.test.ShaDirMixin import ShaDirMixin
from ShaSecurityMixin import ShaSecurityMixin from erp5.component.test.ShaSecurityMixin import ShaSecurityMixin
class TestShaDirExternal(ShaDirMixin, ShaSecurityMixin, ERP5TypeTestCase): class TestShaDirExternal(ShaDirMixin, ShaSecurityMixin, ERP5TypeTestCase):
...@@ -50,13 +50,6 @@ class TestShaDirExternal(ShaDirMixin, ShaSecurityMixin, ERP5TypeTestCase): ...@@ -50,13 +50,6 @@ class TestShaDirExternal(ShaDirMixin, ShaSecurityMixin, ERP5TypeTestCase):
""" """
return "SHADIR External - Real Usage Of ShaDir" return "SHADIR External - Real Usage Of ShaDir"
def getBusinessTemplateList(self):
"""
Return the list of required business templates.
"""
return ShaDirMixin().getBusinessTemplateList() + \
('networkcache_erp5',)
def afterSetUp(self): def afterSetUp(self):
""" """
Initialize the ERP5 site. Initialize the ERP5 site.
......
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
from AccessControl import Unauthorized from AccessControl import Unauthorized
from Products.ERP5Type.tests.SecurityTestCase import SecurityTestCase from Products.ERP5Type.tests.SecurityTestCase import SecurityTestCase
from ShaDirMixin import ShaDirMixin from erp5.component.test.ShaDirMixin import ShaDirMixin
from ShaSecurityMixin import ShaSecurityMixin from erp5.component.test.ShaSecurityMixin import ShaSecurityMixin
class TestShaDirSecurity(ShaDirMixin, ShaSecurityMixin, SecurityTestCase): class TestShaDirSecurity(ShaDirMixin, ShaSecurityMixin, SecurityTestCase):
...@@ -45,13 +45,6 @@ class TestShaDirSecurity(ShaDirMixin, ShaSecurityMixin, SecurityTestCase): ...@@ -45,13 +45,6 @@ class TestShaDirSecurity(ShaDirMixin, ShaSecurityMixin, SecurityTestCase):
""" """
return "SHADIR Security Test Case" return "SHADIR Security Test Case"
def getBusinessTemplateList(self):
"""
Return the list of required business templates.
"""
return ShaDirMixin().getBusinessTemplateList() + \
('networkcache_erp5',)
def afterSetUp(self): def afterSetUp(self):
""" """
Initialize the ERP5 site. Initialize the ERP5 site.
......
2013-09-08 arnaud.fontaine
* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
2013-09-03 arnaud.fontaine 2013-09-03 arnaud.fontaine
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers. * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
31 32
\ No newline at end of file \ No newline at end of file
erp5_full_text_myisam_catalog
erp5_pdm
erp5_data_set
\ No newline at end of file
...@@ -87,9 +87,6 @@ class TestERP5(ERP5TypeTestCase): ...@@ -87,9 +87,6 @@ class TestERP5(ERP5TypeTestCase):
def getTitle(self): def getTitle(self):
return "Conflict Resolution: ERP5" return "Conflict Resolution: ERP5"
def getBusinessTemplateList(self):
return 'erp5_base', 'test_conflict_resolution'
def afterSetUp(self): def afterSetUp(self):
other_node = self.getOtherZopeNode() other_node = self.getOtherZopeNode()
self.other_node = self.portal.portal_web_services.connect( self.other_node = self.portal.portal_web_services.connect(
......
6 7
\ No newline at end of file \ No newline at end of file
erp5_full_text_myisam_catalog
\ No newline at end of file
...@@ -699,7 +699,7 @@ class TemplateTool (BaseTool): ...@@ -699,7 +699,7 @@ class TemplateTool (BaseTool):
""" """
self.repository_dict = PersistentMapping() self.repository_dict = PersistentMapping()
property_list = ('title', 'version', 'revision', 'description', 'license', property_list = ('title', 'version', 'revision', 'description', 'license',
'dependency', 'provision', 'copyright') 'dependency', 'test_dependency', 'provision', 'copyright')
#LOG('updateRepositoryBusiessTemplateList', 0, #LOG('updateRepositoryBusiessTemplateList', 0,
# 'repository_list = %r' % (repository_list,)) # 'repository_list = %r' % (repository_list,))
for repository in repository_list: for repository in repository_list:
...@@ -749,6 +749,8 @@ class TemplateTool (BaseTool): ...@@ -749,6 +749,8 @@ class TemplateTool (BaseTool):
temp_property_dict.get('license', [''])[0] temp_property_dict.get('license', [''])[0]
property_dict['dependency_list'] = \ property_dict['dependency_list'] = \
temp_property_dict.get('dependency', ()) temp_property_dict.get('dependency', ())
property_dict['test_dependency_list'] = \
temp_property_dict.get('test_dependency', ())
property_dict['provision_list'] = \ property_dict['provision_list'] = \
temp_property_dict.get('provision', ()) temp_property_dict.get('provision', ())
property_dict['copyright_list'] = \ property_dict['copyright_list'] = \
...@@ -878,7 +880,7 @@ class TemplateTool (BaseTool): ...@@ -878,7 +880,7 @@ class TemplateTool (BaseTool):
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getDependencyList') 'getDependencyList')
def getDependencyList(self, bt): def getDependencyList(self, bt, with_test_dependency_list=False):
""" """
Return the list of missing dependencies for a business Return the list of missing dependencies for a business
template, given a tuple : (repository, id) template, given a tuple : (repository, id)
...@@ -896,7 +898,11 @@ class TemplateTool (BaseTool): ...@@ -896,7 +898,11 @@ class TemplateTool (BaseTool):
if repository == bt[0]: if repository == bt[0]:
for property_dict in property_dict_list: for property_dict in property_dict_list:
if property_dict['id'] == bt[1]: if property_dict['id'] == bt[1]:
dependency_list = [q for q in property_dict['dependency_list'] if q] dependency_list = [q.strip() for q in
property_dict['dependency_list'] if q]
if with_test_dependency_list:
dependency_list.extend([q.strip() for q in
property_dict['test_dependency_list'] if q])
for dependency_couple in dependency_list: for dependency_couple in dependency_list:
# dependency_couple is like "erp5_xhtml_style (>= 0.2)" # dependency_couple is like "erp5_xhtml_style (>= 0.2)"
dependency_couple_list = dependency_couple.split(' ', 1) dependency_couple_list = dependency_couple.split(' ', 1)
...@@ -1236,7 +1242,9 @@ class TemplateTool (BaseTool): ...@@ -1236,7 +1242,9 @@ class TemplateTool (BaseTool):
security.declareProtected(Permissions.ManagePortal, security.declareProtected(Permissions.ManagePortal,
'resolveBusinessTemplateListDependency') 'resolveBusinessTemplateListDependency')
def resolveBusinessTemplateListDependency(self, template_title_list): def resolveBusinessTemplateListDependency(self,
template_title_list,
with_test_dependency_list=False):
available_bt5_list = self.getRepositoryBusinessTemplateList() available_bt5_list = self.getRepositoryBusinessTemplateList()
template_title_list = set(template_title_list) template_title_list = set(template_title_list)
...@@ -1249,7 +1257,9 @@ class TemplateTool (BaseTool): ...@@ -1249,7 +1257,9 @@ class TemplateTool (BaseTool):
bt5 = self.decodeRepositoryBusinessTemplateUid(available_bt5.uid) bt5 = self.decodeRepositoryBusinessTemplateUid(available_bt5.uid)
bt5_set.add(bt5) bt5_set.add(bt5)
meta_dependency_set = set() meta_dependency_set = set()
for dep_repository, dep_id in self.getDependencyList(bt5): for dep_repository, dep_id in self.getDependencyList(
bt5,
with_test_dependency_list):
if dep_repository != 'meta': if dep_repository != 'meta':
bt5_set.add((dep_repository, dep_id)) bt5_set.add((dep_repository, dep_id))
else: else:
......
...@@ -45,6 +45,7 @@ revision ...@@ -45,6 +45,7 @@ revision
description description
license license
dependency_list dependency_list
test_dependency_list
provision_list provision_list
copyright_list copyright_list
'''.strip().splitlines() '''.strip().splitlines()
......
...@@ -124,6 +124,7 @@ ...@@ -124,6 +124,7 @@
<list> <list>
<string>my_change_log</string> <string>my_change_log</string>
<string>my_dependency_list</string> <string>my_dependency_list</string>
<string>my_test_dependency_list</string>
<string>my_provision_list</string> <string>my_provision_list</string>
<string>my_copyright_list</string> <string>my_copyright_list</string>
<string>my_license</string> <string>my_license</string>
......
...@@ -35,12 +35,6 @@ class Test(ERP5TypeTestCase): ...@@ -35,12 +35,6 @@ class Test(ERP5TypeTestCase):
def getTitle(self): def getTitle(self):
return "TestActivityTool" return "TestActivityTool"
def getBusinessTemplateList(self):
"""
Tuple of Business Templates we need to install
"""
return ('erp5_base',)
def afterSetUp(self): def afterSetUp(self):
""" """
This is ran before anything, used to set the environment This is ran before anything, used to set the environment
......
2013-09-08 arnaud.fontaine
* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
2013-09-03 arnaud.fontaine 2013-09-03 arnaud.fontaine
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers. * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
41124 41125
\ No newline at end of file \ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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