Commit 8bf633f4 authored by Arnaud Fontaine's avatar Arnaud Fontaine

ZODB Components: erp5_project: Migrate Unit Tests.

parent cc366b99
<?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>testMilestoneReporting</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.tests.testMilestoneReporting</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testMilestoneReporting</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.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<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>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -63,18 +63,18 @@ class TestProject(ERP5TypeTestCase): ...@@ -63,18 +63,18 @@ class TestProject(ERP5TypeTestCase):
# create organisations # create organisations
if not self.portal.organisation_module.has_key('Organisation_1'): if not self.portal.organisation_module.has_key('Organisation_1'):
org = self.portal.organisation_module.newContent( self.portal.organisation_module.newContent(
title='Organisation_1', title='Organisation_1',
id='Organisation_1') id='Organisation_1')
# create organisations # create organisations
if not self.portal.organisation_module.has_key('Organisation_2'): if not self.portal.organisation_module.has_key('Organisation_2'):
org = self.portal.organisation_module.newContent( self.portal.organisation_module.newContent(
title='Organisation_2', title='Organisation_2',
id='Organisation_2') id='Organisation_2')
# create project # create project
if not self.portal.project_module.has_key('Project_1'): if not self.portal.project_module.has_key('Project_1'):
project = self.portal.project_module.newContent( self.portal.project_module.newContent(
portal_type='Project', portal_type='Project',
reference='Project_1', reference='Project_1',
title='Project_1', title='Project_1',
...@@ -83,7 +83,7 @@ class TestProject(ERP5TypeTestCase): ...@@ -83,7 +83,7 @@ class TestProject(ERP5TypeTestCase):
# Create resources # Create resources
module = self.portal.product_module module = self.portal.product_module
if not module.has_key('development'): if not module.has_key('development'):
product = module.newContent( module.newContent(
portal_type='Product', portal_type='Product',
id='development', id='development',
title='Development', title='Development',
......
<?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>testProject</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.tests.testProject</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testProject</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.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<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>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -280,7 +280,6 @@ class TestTaskMixin: ...@@ -280,7 +280,6 @@ class TestTaskMixin:
""" """
task = sequence.get('task') task = sequence.get('task')
project = sequence.get('project') project = sequence.get('project')
resource = sequence.get('resource_list')[0]
organisation_list = sequence.get('organisation_list') organisation_list = sequence.get('organisation_list')
organisation1 = organisation_list[0] organisation1 = organisation_list[0]
organisation2 = organisation_list[1] organisation2 = organisation_list[1]
...@@ -302,7 +301,6 @@ class TestTaskMixin: ...@@ -302,7 +301,6 @@ class TestTaskMixin:
self.stepSetTaskValues(sequence=sequence, self.stepSetTaskValues(sequence=sequence,
sequence_list=sequence_list, **kw) sequence_list=sequence_list, **kw)
task = sequence.get('task') task = sequence.get('task')
project = sequence.get('project')
resource = sequence.get('resource_list')[0] resource = sequence.get('resource_list')[0]
requirement = sequence.get('requirement') requirement = sequence.get('requirement')
task.edit(task_line_resource_value = resource, task.edit(task_line_resource_value = resource,
...@@ -361,7 +359,6 @@ class TestTaskMixin: ...@@ -361,7 +359,6 @@ class TestTaskMixin:
Create task report line and fill with dummy data. Create task report line and fill with dummy data.
""" """
resource = sequence.get('resource_list')[0] resource = sequence.get('resource_list')[0]
portal = self.getPortal()
task_report = sequence.get('task_report') task_report = sequence.get('task_report')
task_report_line = task_report.newContent( task_report_line = task_report.newContent(
portal_type=self.task_report_line_portal_type) portal_type=self.task_report_line_portal_type)
......
<?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>testTask</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.tests.testTask</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testTask</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.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<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>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
############################################################################## ##############################################################################
# #
# Copyright (c) 2007 Nexedi SA and Contributors. All Rights Reserved. # Copyright (c) 2007 Nexedi SA and Contributors. All Rights Reserved.
# Mikolaj Antoszkiewicz <mikolaj@erp5.pl> # Mikolaj Antoszkiewicz <mikolaj@erp5.pl>
# #
...@@ -31,7 +32,7 @@ from unittest import expectedFailure ...@@ -31,7 +32,7 @@ from unittest import expectedFailure
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.Sequence import SequenceList from Products.ERP5Type.tests.Sequence import SequenceList
from testTask import TestTaskMixin from erp5.component.test.testTask import TestTaskMixin
from Products.ERP5Type.tests.SecurityTestCase import SecurityTestCase from Products.ERP5Type.tests.SecurityTestCase import SecurityTestCase
class TestTaskReportDivergenceMixin(TestTaskMixin, SecurityTestCase): class TestTaskReportDivergenceMixin(TestTaskMixin, SecurityTestCase):
...@@ -290,7 +291,6 @@ class TestTaskReportDivergence(TestTaskReportDivergenceMixin, ERP5TypeTestCase) ...@@ -290,7 +291,6 @@ class TestTaskReportDivergence(TestTaskReportDivergenceMixin, ERP5TypeTestCase)
""" """
Use the divergence API to adopt the decision. Use the divergence API to adopt the decision.
""" """
task_report = sequence.get('task_report')
# XXX Check task report solver proposition in UI # XXX Check task report solver proposition in UI
def stepCheckTaskReportDates(self, sequence=None, **kw): def stepCheckTaskReportDates(self, sequence=None, **kw):
......
<?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>testTaskReportDivergence</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.tests.testTaskReportDivergence</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testTaskReportDivergence</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.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<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>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -72,14 +72,14 @@ class TestTaskReportingMixin(ERP5ReportTestCase): ...@@ -72,14 +72,14 @@ class TestTaskReportingMixin(ERP5ReportTestCase):
# create organisations # create organisations
if not self.portal.organisation_module.has_key('Organisation_1'): if not self.portal.organisation_module.has_key('Organisation_1'):
org = self.portal.organisation_module.newContent( self.portal.organisation_module.newContent(
portal_type='Organisation', portal_type='Organisation',
reference='Organisation_1', reference='Organisation_1',
title='Organisation_1', title='Organisation_1',
id='Organisation_1') id='Organisation_1')
if not self.portal.organisation_module.has_key('Organisation_2'): if not self.portal.organisation_module.has_key('Organisation_2'):
org = self.portal.organisation_module.newContent( self.portal.organisation_module.newContent(
portal_type='Organisation', portal_type='Organisation',
reference='Organisation_2', reference='Organisation_2',
title='Organisation_2', title='Organisation_2',
...@@ -87,13 +87,13 @@ class TestTaskReportingMixin(ERP5ReportTestCase): ...@@ -87,13 +87,13 @@ class TestTaskReportingMixin(ERP5ReportTestCase):
# create persons # create persons
if not self.portal.person_module.has_key('Person_1'): if not self.portal.person_module.has_key('Person_1'):
org = self.portal.person_module.newContent( self.portal.person_module.newContent(
portal_type='Person', portal_type='Person',
reference='Person_1', reference='Person_1',
title='Person_1', title='Person_1',
id='Person_1') id='Person_1')
if not self.portal.person_module.has_key('Person_2'): if not self.portal.person_module.has_key('Person_2'):
org = self.portal.person_module.newContent( self.portal.person_module.newContent(
portal_type='Person', portal_type='Person',
reference='Person_2', reference='Person_2',
title='Person_2', title='Person_2',
...@@ -135,7 +135,7 @@ class TestTaskReportingMixin(ERP5ReportTestCase): ...@@ -135,7 +135,7 @@ class TestTaskReportingMixin(ERP5ReportTestCase):
# Create resources # Create resources
module = self.portal.product_module module = self.portal.product_module
if not module.has_key('development'): if not module.has_key('development'):
product = module.newContent( module.newContent(
portal_type='Product', portal_type='Product',
id='development', id='development',
title='Development', title='Development',
...@@ -143,7 +143,7 @@ class TestTaskReportingMixin(ERP5ReportTestCase): ...@@ -143,7 +143,7 @@ class TestTaskReportingMixin(ERP5ReportTestCase):
quantity_unit='day' quantity_unit='day'
) )
if not module.has_key('consulting'): if not module.has_key('consulting'):
product = module.newContent( module.newContent(
portal_type='Product', portal_type='Product',
id='consulting', id='consulting',
title='Consulting', title='Consulting',
......
<?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>testTaskReporting</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.tests.testTaskReporting</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testTaskReporting</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.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<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>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
test.erp5.testMilestoneReporting
test.erp5.testProject
test.erp5.testTask
test.erp5.testTaskReportDivergence
test.erp5.testTaskReporting
\ No newline at end of file
erp5_full_text_mroonga_catalog
erp5_base
erp5_pdm
erp5_simulation
erp5_movement_table_catalog
erp5_project_mysql_innodb_catalog
erp5_configurator_standard_trade_template
erp5_configurator_standard_solver
erp5_core_proxy_field_legacy
erp5_simulation_test
erp5_simulation_test_trade_template
\ No newline at end of file
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
############################################################################## ##############################################################################
from DateTime import DateTime from DateTime import DateTime
from Products.ERP5.tests.testTaskReporting import TestTaskReportingMixin from erp5.component.test.testTaskReporting import TestTaskReportingMixin
class TestResearchItemSummaryReport(TestTaskReportingMixin): class TestResearchItemSummaryReport(TestTaskReportingMixin):
""" """
......
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