Commit c35d24e8 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 8ee4b16a
......@@ -10,9 +10,6 @@ class TestERP5BearerToken(ERP5TypeTestCase):
test_token_extraction_id = 'bearer_test_extraction'
def getBusinessTemplateList(self):
return ('erp5_base', 'erp5_bearer_token')
def generateNewId(self):
return str(self.portal.portal_ids.generateNewId(
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
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
13
\ No newline at end of file
14
\ No newline at end of file
erp5_full_text_myisam_catalog
\ No newline at end of file
......@@ -66,14 +66,6 @@ class TestMaxmaDemoConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
'erp5_l10n_pt-BR',
'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,\
sequence_list=None, **kw):
""" 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
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
29
\ No newline at end of file
30
\ 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):
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):
""" Create one Business Configuration """
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
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
11
\ No newline at end of file
12
\ 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
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
667
\ No newline at end of file
668
\ No newline at end of file
erp5_full_text_myisam_catalog
\ No newline at end of file
......@@ -104,14 +104,6 @@ class TestUNGConfiguratorWorkflowMixin(TestLiveConfiguratorWorkflowMixin):
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):
""" Create one Business Configuration """
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
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
61
\ No newline at end of file
62
\ 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):
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self, quiet=quiet)
def getBusinessTemplateList(self):
"""return list of business templates to be installed. """
return ( 'erp5_base',)
def afterSetUp(self):
"""
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
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
764
\ No newline at end of file
765
\ No newline at end of file
......@@ -9,19 +9,6 @@ class TestDiscussionThread(SecurityTestCase):
def getTitle(self):
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):
"""
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
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
7
\ No newline at end of file
8
\ 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):
"""
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):
"""
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
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
148
\ No newline at end of file
149
\ 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
from Products.ERP5.ERP5Site import addERP5Tool
class TestInotifyTool(ERP5TypeTestCase):
def getBusinessTemplateList(self):
return "erp5_core_proxy_field_legacy", "erp5_inotify"
def test_inotify(self):
from Products.ERP5.Tool.InotifyTool import IN_CREATE, IN_MODIFY, IN_DELETE
addERP5Tool(self.portal, 'portal_inotify', 'Inotify Tool')
......
5
\ No newline at end of file
6
\ No newline at end of file
erp5_core_proxy_field_legacy
\ No newline at end of file
......@@ -55,10 +55,6 @@ SOAPBinding.registerServiceClass(HelloWorldService)
class TestSoapBinding(ERP5TypeTestCase):
def getBusinessTemplateList(self):
return 'erp5_interfaces',
def createBinding(self, target_namespace, service_class):
return self.portal.portal_interfaces.newContent(
self._testMethodName, 'SOAP Binding',
......
4
\ No newline at end of file
5
\ No newline at end of file
......@@ -35,12 +35,7 @@ import unittest
from Products.ERP5Type.tests.prepareFunctionalTest import TestZelenium
class MobileTestZelenium(TestZelenium):
def getBusinessTemplateList(self):
"""
Return the list of business templates.
"""
return ('erp5_base', 'erp5_ui_test_core', 'erp5_ui_test',
'erp5_mobile', 'erp5_mobile_ui_test',)
pass
def test_suite():
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
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
erp5_ui_test
erp5_mobile
\ No newline at end of file
12
\ No newline at end of file
13
\ No newline at end of file
......@@ -40,14 +40,6 @@ class TestERP5PaypalSecurePaymentMixin(ERP5TypeTestCase):
def getTitle(self):
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):
self.portal = self.getPortalObject()
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
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
9
\ No newline at end of file
10
\ No newline at end of file
erp5_full_text_myisam_catalog
\ No newline at end of file
......@@ -41,14 +41,6 @@ class TestERP5PayzenSecurePaymentMixin(ERP5TypeTestCase):
def getTitle(self):
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):
self.portal = self.getPortalObject()
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
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
52
\ No newline at end of file
53
\ No newline at end of file
erp5_full_text_myisam_catalog
\ No newline at end of file
......@@ -29,15 +29,6 @@ from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5OOo.tests.testDms import makeFileUpload
class TestERP5PDFMerge(ERP5TypeTestCase):
def getBusinessTemplateList(self):
"""Tuple of Business Templates we need to install
"""
return ( 'erp5_base',
'erp5_web',
'erp5_ingestion',
'erp5_dms',
'erp5_pdf_merge' )
def test_erp5_merge_pdf(self):
document = self.portal.portal_contributions.newContent(
file=makeFileUpload('REF-en-001.pdf'))
......
3
\ No newline at end of file
4
\ 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):
return FileUpload(path, as_name)
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):
portal = self.getPortalObject()
self.image_module = self.portal.getDefaultModule(portal_type = 'Image Module')
......
erp5_base
erp5_web
erp5_dms
\ No newline at end of file
14
\ No newline at end of file
15
\ 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
class TestERP5SocialContracts(ERP5TypeTestCase):
"""Test for erp5_social_contracts business template.
"""
def getBusinessTemplateList(self):
return ('erp5_base', 'erp5_social_contracts', )
def afterSetUp(self):
self.person_1 = self.portal.person_module.newContent(
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
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
28
\ No newline at end of file
29
\ No newline at end of file
erp5_full_text_myisam_catalog
\ No newline at end of file
......@@ -37,12 +37,6 @@ class testSyncMLAsynchronousEngine(TestERP5SyncMLMixin):
def getTitle(self):
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):
"""
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
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
erp5_syncml
erp5_base
\ No newline at end of file
5
\ No newline at end of file
6
\ No newline at end of file
erp5_full_text_myisam_catalog
\ No newline at end of file
......@@ -5,11 +5,6 @@ from Products.ERP5.Document.ERP5ProjectUnitTestDistributor import \
import json
class TestTaskDistribution(ERP5TypeTestCase):
def getBusinessTemplateList(self):
return ("erp5_base",
"erp5_test_result")
def afterSetUp(self):
self.portal = portal = self.getPortalObject()
self.test_node_module = self.portal.getDefaultModule(portal_type = 'Test Node 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
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
251
\ No newline at end of file
252
\ 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):
"""
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):
"""
Initialize the ERP5 site.
......
......@@ -31,7 +31,7 @@
import httplib
import urlparse
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
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
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
68
\ No newline at end of file
69
\ No newline at end of file
erp5_full_text_myisam_catalog
\ No newline at end of file
......@@ -39,25 +39,6 @@ class ShaDirMixin(object):
"""
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):
"""
Initialize the ERP5 site.
......
......@@ -33,7 +33,7 @@ import urlparse
import json
import random
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
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
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
75
\ No newline at end of file
76
\ 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
* Export knowledge pad and gadget preserving its state
......
53
\ No newline at end of file
54
\ No newline at end of file
erp5_full_text_myisam_catalog
\ No newline at end of file
......@@ -38,37 +38,6 @@ class TestUNGSecurity(ERP5TypeTestCase):
def getTitle(self):
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):
person_module = self.getPersonModule()
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
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
36
\ No newline at end of file
37
\ 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):
def getTitle(self):
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):
"""Clean up form"""
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
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
415
\ No newline at end of file
416
\ 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
import httplib
from DateTime import DateTime
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from ShaCacheMixin import ShaCacheMixin
from ShaSecurityMixin import ShaSecurityMixin
from erp5.component.test.ShaCacheMixin import ShaCacheMixin
from erp5.component.test.ShaSecurityMixin import ShaSecurityMixin
from Products.ERP5Type.tests.backportUnittest import expectedFailure
class TestShaCacheExternal(ShaCacheMixin, ShaSecurityMixin, ERP5TypeTestCase):
......@@ -48,14 +48,6 @@ class TestShaCacheExternal(ShaCacheMixin, ShaSecurityMixin, ERP5TypeTestCase):
"""
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):
"""
Initialize the ERP5 site.
......
......@@ -30,8 +30,8 @@
from AccessControl import Unauthorized
from Products.ERP5Type.tests.SecurityTestCase import SecurityTestCase
from ShaCacheMixin import ShaCacheMixin
from ShaSecurityMixin import ShaSecurityMixin
from erp5.component.test.ShaCacheMixin import ShaCacheMixin
from erp5.component.test.ShaSecurityMixin import ShaSecurityMixin
class TestShaCacheSecurity(ShaCacheMixin, ShaSecurityMixin, SecurityTestCase):
......@@ -45,16 +45,6 @@ class TestShaCacheSecurity(ShaCacheMixin, ShaSecurityMixin, SecurityTestCase):
"""
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):
"""
Initialize the ERP5 site.
......
......@@ -34,8 +34,8 @@ import os
import httplib
from DateTime import DateTime
from Products.ERP5Type.tests.ERP5TypeLiveTestCase import ERP5TypeTestCase
from ShaDirMixin import ShaDirMixin
from ShaSecurityMixin import ShaSecurityMixin
from erp5.component.test.ShaDirMixin import ShaDirMixin
from erp5.component.test.ShaSecurityMixin import ShaSecurityMixin
class TestShaDirExternal(ShaDirMixin, ShaSecurityMixin, ERP5TypeTestCase):
......@@ -50,13 +50,6 @@ class TestShaDirExternal(ShaDirMixin, ShaSecurityMixin, ERP5TypeTestCase):
"""
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):
"""
Initialize the ERP5 site.
......
......@@ -30,8 +30,8 @@
from AccessControl import Unauthorized
from Products.ERP5Type.tests.SecurityTestCase import SecurityTestCase
from ShaDirMixin import ShaDirMixin
from ShaSecurityMixin import ShaSecurityMixin
from erp5.component.test.ShaDirMixin import ShaDirMixin
from erp5.component.test.ShaSecurityMixin import ShaSecurityMixin
class TestShaDirSecurity(ShaDirMixin, ShaSecurityMixin, SecurityTestCase):
......@@ -45,13 +45,6 @@ class TestShaDirSecurity(ShaDirMixin, ShaSecurityMixin, SecurityTestCase):
"""
return "SHADIR Security Test Case"
def getBusinessTemplateList(self):
"""
Return the list of required business templates.
"""
return ShaDirMixin().getBusinessTemplateList() + \
('networkcache_erp5',)
def afterSetUp(self):
"""
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
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
......
31
\ No newline at end of file
32
\ 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):
def getTitle(self):
return "Conflict Resolution: ERP5"
def getBusinessTemplateList(self):
return 'erp5_base', 'test_conflict_resolution'
def afterSetUp(self):
other_node = self.getOtherZopeNode()
self.other_node = self.portal.portal_web_services.connect(
......
6
\ No newline at end of file
7
\ No newline at end of file
erp5_full_text_myisam_catalog
\ No newline at end of file
......@@ -699,7 +699,7 @@ class TemplateTool (BaseTool):
"""
self.repository_dict = PersistentMapping()
property_list = ('title', 'version', 'revision', 'description', 'license',
'dependency', 'provision', 'copyright')
'dependency', 'test_dependency', 'provision', 'copyright')
#LOG('updateRepositoryBusiessTemplateList', 0,
# 'repository_list = %r' % (repository_list,))
for repository in repository_list:
......@@ -749,6 +749,8 @@ class TemplateTool (BaseTool):
temp_property_dict.get('license', [''])[0]
property_dict['dependency_list'] = \
temp_property_dict.get('dependency', ())
property_dict['test_dependency_list'] = \
temp_property_dict.get('test_dependency', ())
property_dict['provision_list'] = \
temp_property_dict.get('provision', ())
property_dict['copyright_list'] = \
......@@ -878,8 +880,9 @@ class TemplateTool (BaseTool):
security.declareProtected(Permissions.AccessContentsInformation,
'getDependencyList')
@transactional_cached(lambda self, bt: bt)
def getDependencyList(self, bt):
@transactional_cached(lambda self, bt, with_test_dependency_list=False:
(bt, with_test_dependency_list))
def getDependencyList(self, bt, with_test_dependency_list=False):
"""
Return the list of missing dependencies for a business
template, given a tuple : (repository, id)
......@@ -892,7 +895,11 @@ class TemplateTool (BaseTool):
if repository == bt[0]:
for property_dict in property_dict_list:
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:
# dependency_couple is like "erp5_xhtml_style (>= 0.2)"
dependency_couple_list = dependency_couple.split(' ', 1)
......@@ -1231,7 +1238,9 @@ class TemplateTool (BaseTool):
security.declareProtected(Permissions.ManagePortal,
'resolveBusinessTemplateListDependency')
def resolveBusinessTemplateListDependency(self, template_title_list):
def resolveBusinessTemplateListDependency(self,
template_title_list,
with_test_dependency_list=False):
available_bt5_list = self.getRepositoryBusinessTemplateList()
template_title_list = set(template_title_list)
......@@ -1244,7 +1253,9 @@ class TemplateTool (BaseTool):
bt5 = self.decodeRepositoryBusinessTemplateUid(available_bt5.uid)
bt5_set.add(bt5)
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':
bt5_set.add((dep_repository, dep_id))
else:
......
......@@ -45,6 +45,7 @@ revision
description
license
dependency_list
test_dependency_list
provision_list
copyright_list
'''.strip().splitlines()
......
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