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
\ No newline at end of file
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
\ No newline at end of file
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
......@@ -31,4 +34,4 @@
* Remove erp5_jquery folder and added erp5_jquery bt5 as dependency.
2010-10-13 gabriel
* The initial version.
* The initial version.
\ No newline at end of file
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()
......
......@@ -124,6 +124,7 @@
<list>
<string>my_change_log</string>
<string>my_dependency_list</string>
<string>my_test_dependency_list</string>
<string>my_provision_list</string>
<string>my_copyright_list</string>
<string>my_license</string>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="LinesField" module="Products.Formulator.StandardFields"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_test_dependency_list</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
<item>
<key> <string>line_too_long</string> </key>
<value> <string>A line was too long.</string> </value>
</item>
<item>
<key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
<item>
<key> <string>too_long</string> </key>
<value> <string>You entered too many characters.</string> </value>
</item>
<item>
<key> <string>too_many_lines</string> </key>
<value> <string>You entered too many lines.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_linelength</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_lines</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>view_separator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_linelength</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_lines</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>view_separator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_linelength</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_lines</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Tests Dependencies</string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>view_separator</string> </key>
<value> <string encoding="cdata"><![CDATA[
<br />
]]></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>40</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -35,12 +35,6 @@ class Test(ERP5TypeTestCase):
def getTitle(self):
return "TestActivityTool"
def getBusinessTemplateList(self):
"""
Tuple of Business Templates we need to install
"""
return ('erp5_base',)
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.
......
41124
\ No newline at end of file
41125
\ No newline at end of file
erp5_full_text_myisam_catalog
erp5_base
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Standard Property" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>elementary_type/lines</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>a list of template names required by this template to run unit tests from an instance created only for unit tests</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test_dependency_property</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Standard Property</string> </value>
</item>
<item>
<key> <string>property_default</string> </key>
<value> <string>python: ()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
2013-09-08 arnaud.fontaine
* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
2013-08-20 arnaud.fontaine
* ZODB Components: Add BusinessTemplate property to specify the object paths whose only last workflow history must be kept on export.
......
64
\ No newline at end of file
65
\ No newline at end of file
......@@ -277,7 +277,6 @@ else:
real_instance_home = os.path.sep.join(
tests_framework_home.split(os.path.sep)[:-3])
class ERP5TypeTestLoader(unittest.TestLoader):
"""Load test cases from the name passed on the command line.
"""
......@@ -289,40 +288,32 @@ class ERP5TypeTestLoader(unittest.TestLoader):
lambda self, value: None)
def loadTestsFromName(self, name, module=None):
"""This method is here for compatibility with old style arguments.
"""
This method is here for compatibility with old style arguments:
- It is possible to have the .py prefix for the test file
- It is possible to separate test classes with : instead of .
And, also to load ZODB Test Component before passing it to unittest
TestLoader().
"""
# backward compatibility
if name.endswith('.py'):
name = name[:-3]
name = name.replace(':', '.')
# TODO-arnau: Dirty hack to allow './runUnitTest test.erp5.testFoo'. This
# must be implemented properly by specifiying the bt5 *and* test name
if name.startswith('test.'):
for path in sys.path:
if not path.endswith('/portal_components'):
continue
if ':' in name:
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.ERP5TypeLiveTestCase import ERP5TypeLiveTestCase
component_module_name = name.split('.')[2]
component_filename = '.'.join(name.split('.', 3)[:3]) + '.py'
component_path = os.path.join(path, component_filename)
if not os.path.isfile(component_path):
continue
# TestLoader() does not perform any import so import the Module manually
module = __import__('erp5.component.test',
fromlist=['erp5.component.test'],
level=0)
with open(component_path) as component_file:
import imp
module = imp.new_module(component_module_name)
setattr(module,
component_module_name,
imp.load_module(component_module_name,
component_file,
component_filename,
('.py', 'rb', imp.PY_SOURCE)))
# TODO-arnau: What about loading a test for a specific Component Version?
name = name.split(':')[1]
name = '.'.join(name.split('.', 3)[2:])
break
__import__('erp5.component.test.%s' % name.split('.')[0],
['erp5.component.test'],
level=0)
return super(ERP5TypeTestLoader, self).loadTestsFromName(name, module)
......@@ -333,6 +324,108 @@ class ERP5TypeTestLoader(unittest.TestLoader):
return self.suiteClass(module.test_suite())
return super(ERP5TypeTestLoader, self).loadTestsFromModule(module)
def loadTestsFromNames(self, test_list):
# ZODB Test Components requires bootstrap to install BTs before running the
# actual test
test_list_len = len(test_list)
if test_list_len > 0 and ':' in test_list[0]:
# TODO-arnau: Does anyone specifies multiple test file on command line, at
# least test bot does not...
if test_list_len > 1:
raise NotImplementedError("Cannot specify multiple Unit Tests to run "
"with ZODB Test Components")
# Cannot be imported at top-level as importing ERP5TypeTestCase has side
# effects and a lot of magic has to be done before. Otherwise,
# getLogger('CMFActivity') was failing because no handlers were set up.
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeCommandLineTestCase
class _ZodbTestComponentBootstrapOnly(ERP5TypeCommandLineTestCase):
"""
Bootstrap class for ZODB Test Components which reuses as much as possible
code with "normal" tests as the only difference is how Business Templates are
installed.
With legacy tests, a test is directly loaded from the filesystem by adding BTs
TestTemplateItem directories to sys.path and the list of Business Templates is
given by its getBusinessTemplateList() method.
However, with ZODB Components, importing erp5.component.* modules and using
Component Versions require ERP5 site to be loaded and dependencies BTs to be
installed beforehand (and the entry point is thus the BT title and the test to
be loaded as specified on the command line (BT:TEST_NAME instead of
TEST_NAME)). Any other way would be adhoc and would meant having a different
behavior between running an Unit Test and a Live Test.
"""
def __init__(self, test_list):
self._test_list = test_list
self._bt_already_installed_list = []
def getBusinessTemplateList(self):
"""
Only return the Business Template specifies on the command line, its
dependencies will be resolved through bt5list and Template Tool
(dependency_list and test_dependency_list BT properties)
"""
return [ test.split(':')[0] for test in self._test_list ]
@staticmethod
def _getBTPathAndIdList(bt_list):
"""
Overriden as the original method manually checks BT URLs, handled through
Template Tool resolveBusinessTemplateList() methods for ZODB Components
"""
return bt_list
def _installBusinessTemplateList(self,
bt_list,
update_repository_bt_list=True,
*args,
**kwargs):
"""
Before installing BTs by calling the original method:
1/ Get filesystem BT repositories and set them to Template Tool
2/ Update BT repositories
3/ Resolve dependencies:
* dependency_list: recursive.
* test_dependency_list: non-recursive.
4/ Install BTs as before
"""
template_tool = self.portal.portal_templates
from Products.ERP5.ERP5Site import getBootstrapDirectory
bt5_path_list = [os.environ.get('erp5_tests_bootstrap_path') or
getBootstrapDirectory()]
bt5_path = os.environ.get('erp5_tests_bt5_path')
if bt5_path:
bt5_path_list.extend([ bt5_path.replace('*', '')
for bt5_path in bt5_path.split(',') ])
else:
from App.config import getConfiguration
instancehome = getConfiguration().instancehome
bt5_path_list.append(os.path.join(instancehome, 'bt5'))
bt5_path_list = [bt5_path for bt5_path in bt5_path_list
if os.path.exists(bt5_path)]
template_tool.updateRepositoryBusinessTemplateList(bt5_path_list)
url_bt_tuple_list = [
('%s/%s' % (repository, bt_title), bt_title) for repository, bt_title in
template_tool.resolveBusinessTemplateListDependency(
bt_list,
with_test_dependency_list=True)]
return super(_ZodbTestComponentBootstrapOnly,
self)._installBusinessTemplateList(url_bt_tuple_list,
*args, **kwargs)
_ZodbTestComponentBootstrapOnly(test_list).setUp()
return super(ERP5TypeTestLoader, self).loadTestsFromNames(test_list)
def getTestCaseNames(self, testCaseClass):
"""Return a sorted sequence of method names found within testCaseClass
......
import glob, os, subprocess, re
from glob import glob
import os, subprocess, re
# test_suite is provided by 'run_test_suite'
from test_suite import ERP5TypeTestSuite
import sys
......@@ -28,11 +29,19 @@ class _ERP5(ERP5TypeTestSuite):
def _getAllTestList(self):
test_list = []
path = sys.path[0]
component_re = re.compile(".*/([^/]+)/TestTemplateItem/portal_components"
"/test\.[^.]+\.([^.]+).py$")
for test_path in (
glob.glob('%s/product/*/tests/test*.py' % sys.path[0]) +
glob.glob('%s/bt5/*/TestTemplateItem/test*.py' % sys.path[0]) +
glob.glob('%s/bt5/*/TestTemplateItem/portal_components/test.*.test*.py' % sys.path[0])):
test_case = test_path.split(os.sep)[-1][:-3] # remove .py
glob('%s/product/*/tests/test*.py' % path) +
glob('%s/bt5/*/TestTemplateItem/test*.py' % path) +
glob('%s/bt5/*/TestTemplateItem/portal_components/test.*.test*.py' % path)):
component_re_match = component_re.match(test_path)
if component_re_match is not None:
test_case = "%s:%s" % (component_re_match.group(1),
component_re_match.group(2))
else:
test_case = test_path.split(os.sep)[-1][:-3] # remove .py
product = test_path.split(os.sep)[-3]
# don't test 3rd party products
if product in ('PortalTransforms', 'MailTemplates', 'Zelenium'):
......@@ -64,35 +73,36 @@ class ERP5(_ERP5):
def getTestList(self):
test_list = []
for test_case in self._getAllTestList():
for full_test_case in self._getAllTestList():
test_case = (':' in full_test_case and full_test_case.split(':')[1]
or full_test_case)
# skip some tests
if ('testLive' in test_case or
'testVifib' in test_case or
test_case.find('Performance') > 0 or
# XXX (Ivan), until LDAP server is available this test will alway fail
test_case.endswith('testERP5LdapCatalog') or
# tests reading selenium tables from erp5.com
test_case.endswith('testFunctionalStandaloneUserTutorial') or
test_case.endswith('testFunctionalRunMyDocSample') or
test_case.endswith('testFunctionalConfigurator') or
test_case.endswith('testFunctionalConfiguratorConsulting') or
# not maintained
test_case.endswith('testERP5eGov') or
test_case.endswith('testAccounting_l10n_fr_m9')):
if test_case.startswith('testLive') or test_case.startswith('testVifib') \
or test_case.find('Performance') > 0 \
or test_case in ('testERP5LdapCatalog', # XXX (Ivan), until LDAP server is available this test will alway fail
# tests reading selenium tables from erp5.com
'testFunctionalStandaloneUserTutorial',
'testFunctionalRunMyDocSample',
'testFunctionalConfigurator',
'testFunctionalConfiguratorConsulting',
# not maintained
'testERP5eGov',
'testAccounting_l10n_fr_m9'):
continue
test_list.append(test_case)
test_list.append(full_test_case)
return test_list
def run(self, test):
if (test.endswith('testConflictResolution') or
test.endswith('testInvalidationBug')):
status_dict = self.runUnitTest('--save', test)
def run(self, full_test):
test = ':' in full_test and full_test.split(':')[1] or full_test
if test in ('testConflictResolution', 'testInvalidationBug'):
status_dict = self.runUnitTest('--save', full_test)
if not status_dict['status_code']:
status_dict = self.runUnitTest('--load', '--activity_node=2', test)
status_dict = self.runUnitTest('--load', '--activity_node=2', full_test)
return status_dict
if test.startswith('testFunctional'):
return self._updateFunctionalTestResponse(self.runUnitTest(test))
return super(ERP5, self).run(test)
return self._updateFunctionalTestResponse(self.runUnitTest(full_test))
return super(ERP5, self).run(full_test)
def _updateFunctionalTestResponse(self, status_dict):
""" Convert the Unit Test output into more accurate information
......
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