Commit e43ca64b authored by Sebastien Robin's avatar Sebastien Robin

DCWorkflow to ERP5Workflow (preparation): move Worklist tests into portal_components

For new developments, we should use portal_components. So move theses tests to
portal_components before Workflow changes.
parent 2f706838
##############################################################################
#
# Copyright (c) 2007 Nexedi SA and Contributors.
# Copyright (c) 2002-2017 Nexedi SA and Contributors. All Rights Reserved.
# All Rights Reserved.
# Romain Courteaud <romain@nexedi.com>
#
......@@ -23,12 +23,10 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
##############################################################################
import unittest
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Testing.ZopeTestCase.PortalTestCase import PortalTestCase
......@@ -36,7 +34,6 @@ class TestWorklist(ERP5TypeTestCase):
run_all_test = 1
quiet = 1
login = PortalTestCase.login
checked_portal_type = 'Organisation'
module_selection_name = 'organisation_module_selection'
......@@ -514,10 +511,4 @@ class TestWorklist(ERP5TypeTestCase):
url_parameter_dict=url_parameter_dict)
finally:
self.removeWorklist(self.checked_workflow, ['region_worklist'])
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestWorklist))
return suite
self.removeWorklist(self.checked_workflow, ['region_worklist'])
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_recorded_property_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testWorklist</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testWorklist</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
erp5_base
erp5_full_text_mroonga_catalog
\ No newline at end of file
Unit Tests for Core ERP5
\ No newline at end of file
test.erp5.testWorklist
\ No newline at end of file
erp5_core_test
\ No newline at end of file
001
\ No newline at end of file
##############################################################################
#
# Copyright (c) 2007 Nexedi SA and Contributors.
# Copyright (c) 2002-2017 Nexedi SA and Contributors. All Rights Reserved.
# All Rights Reserved.
# Vincent Pelletier <vincent@nexedi.com>
#
......@@ -23,12 +23,12 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
##############################################################################
import unittest
from Products.ERP5.tests.testWorklist import TestWorklist
from erp5.component.test.testWorklist import TestWorklist
from Products.ERP5Type.tests.utils import todo_erp5
class TestSQLCachedWorklist(TestWorklist):
......@@ -45,7 +45,9 @@ class TestSQLCachedWorklist(TestWorklist):
test_02_related_key = todo_erp5(TestWorklist.test_02_related_key)
test_04_dynamic_variables = todo_erp5(TestWorklist.test_04_dynamic_variables)
# This could should not be needed. But since we import another test, automatic
# creation of suite also add the suite of TestWorklist, and we do not want this
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestSQLCachedWorklist))
return suite
return suite
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSQLCachedWorklist</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSQLCachedWorklist</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
erp5_base
erp5_core_test
erp5_worklist_sql
\ No newline at end of file
Unit Tests for SQL worklist
\ No newline at end of file
test.erp5.testSQLCachedWorklist
\ No newline at end of file
erp5_worklist_sql_test
\ No newline at end of file
......@@ -430,6 +430,8 @@ class ERP5TypeTestCaseMixin(ProcessingNodeTestCase, PortalTestCase):
ti.setTypePropertySheetList(list(property_sheet_set))
# remember that we added a property sheet for tear down
if getattr(self, '_added_property_sheets', None) is None:
self._added_property_sheets = {}
self._added_property_sheets.setdefault(
portal_type_name, []).append(property_sheet_name)
......
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