Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Frederic Thoma
erp5
Commits
216c2233
Commit
216c2233
authored
Sep 02, 2020
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ZODB Components: erp5_project: Migrate Unit Tests.
parent
c8548044
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
742 additions
and
40 deletions
+742
-40
bt5/erp5_project/TestTemplateItem/portal_components/test.erp5.testMilestoneReporting.py
...tem/portal_components/test.erp5.testMilestoneReporting.py
+1
-15
bt5/erp5_project/TestTemplateItem/portal_components/test.erp5.testMilestoneReporting.xml
...em/portal_components/test.erp5.testMilestoneReporting.xml
+104
-0
bt5/erp5_project/TestTemplateItem/portal_components/test.erp5.testProject.py
...stTemplateItem/portal_components/test.erp5.testProject.py
+4
-4
bt5/erp5_project/TestTemplateItem/portal_components/test.erp5.testProject.xml
...tTemplateItem/portal_components/test.erp5.testProject.xml
+110
-0
bt5/erp5_project/TestTemplateItem/portal_components/test.erp5.testTask.py
.../TestTemplateItem/portal_components/test.erp5.testTask.py
+6
-12
bt5/erp5_project/TestTemplateItem/portal_components/test.erp5.testTask.xml
...TestTemplateItem/portal_components/test.erp5.testTask.xml
+110
-0
bt5/erp5_project/TestTemplateItem/portal_components/test.erp5.testTaskReportDivergence.py
...m/portal_components/test.erp5.testTaskReportDivergence.py
+1
-2
bt5/erp5_project/TestTemplateItem/portal_components/test.erp5.testTaskReportDivergence.xml
.../portal_components/test.erp5.testTaskReportDivergence.xml
+110
-0
bt5/erp5_project/TestTemplateItem/portal_components/test.erp5.testTaskReporting.py
...lateItem/portal_components/test.erp5.testTaskReporting.py
+6
-6
bt5/erp5_project/TestTemplateItem/portal_components/test.erp5.testTaskReporting.xml
...ateItem/portal_components/test.erp5.testTaskReporting.xml
+110
-0
bt5/erp5_project/bt/template_test_id_list
bt5/erp5_project/bt/template_test_id_list
+5
-0
bt5/erp5_project/bt/test_dependency_list
bt5/erp5_project/bt/test_dependency_list
+9
-0
bt5/erp5_project_mysql_innodb_catalog/TestTemplateItem/portal_components/test.erp5.testOptimizedMilestoneReporting.py
...l_components/test.erp5.testOptimizedMilestoneReporting.py
+44
-0
bt5/erp5_project_mysql_innodb_catalog/TestTemplateItem/portal_components/test.erp5.testOptimizedMilestoneReporting.xml
..._components/test.erp5.testOptimizedMilestoneReporting.xml
+106
-0
bt5/erp5_project_mysql_innodb_catalog/bt/template_test_id_list
...rp5_project_mysql_innodb_catalog/bt/template_test_id_list
+1
-0
bt5/erp5_project_mysql_innodb_catalog/bt/test_dependency_list
...erp5_project_mysql_innodb_catalog/bt/test_dependency_list
+14
-0
bt5/erp5_research_item/TestTemplateItem/portal_components/test.erp5.testResearchItemSummaryReport.py
...tal_components/test.erp5.testResearchItemSummaryReport.py
+1
-1
No files found.
product/ERP5/tests/
testMilestoneReporting.py
→
bt5/erp5_project/TestTemplateItem/portal_components/test.erp5.
testMilestoneReporting.py
View file @
216c2233
...
...
@@ -186,18 +186,4 @@ class TestMilestoneReporting(MilestoneReportingMixin, ERP5ReportTestCase):
return
self
.
business_template_list
def
testMilestoneReport
(
self
):
self
.
checkMilestoneReport
()
class
TestOptimisedMilestoneReporting
(
MilestoneReportingMixin
,
ERP5ReportTestCase
):
"""Same as above, with additionnal business template adding extra
tables in order to do optimisations
"""
def
getTitle
(
self
):
return
"Optimised Milestone Reporting"
def
getBusinessTemplateList
(
self
):
"""Returns list of BT to be installed."""
return
self
.
business_template_list
+
(
'erp5_project_mysql_innodb_catalog'
,)
def
testMilestoneReport
(
self
):
self
.
checkMilestoneReport
(
optimised
=
True
)
self
.
checkMilestoneReport
()
\ No newline at end of file
bt5/erp5_project/TestTemplateItem/portal_components/test.erp5.testMilestoneReporting.xml
0 → 100644
View file @
216c2233
<?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>
product/ERP5/tests/
testProject.py
→
bt5/erp5_project/TestTemplateItem/portal_components/test.erp5.
testProject.py
View file @
216c2233
...
...
@@ -63,18 +63,18 @@ class TestProject(ERP5TypeTestCase):
# create organisations
if
not
self
.
portal
.
organisation_module
.
has_key
(
'Organisation_1'
):
org
=
self
.
portal
.
organisation_module
.
newContent
(
self
.
portal
.
organisation_module
.
newContent
(
title
=
'Organisation_1'
,
id
=
'Organisation_1'
)
# create organisations
if
not
self
.
portal
.
organisation_module
.
has_key
(
'Organisation_2'
):
org
=
self
.
portal
.
organisation_module
.
newContent
(
self
.
portal
.
organisation_module
.
newContent
(
title
=
'Organisation_2'
,
id
=
'Organisation_2'
)
# create project
if
not
self
.
portal
.
project_module
.
has_key
(
'Project_1'
):
project
=
self
.
portal
.
project_module
.
newContent
(
self
.
portal
.
project_module
.
newContent
(
portal_type
=
'Project'
,
reference
=
'Project_1'
,
title
=
'Project_1'
,
...
...
@@ -83,7 +83,7 @@ class TestProject(ERP5TypeTestCase):
# Create resources
module
=
self
.
portal
.
product_module
if
not
module
.
has_key
(
'development'
):
product
=
module
.
newContent
(
module
.
newContent
(
portal_type
=
'Product'
,
id
=
'development'
,
title
=
'Development'
,
...
...
bt5/erp5_project/TestTemplateItem/portal_components/test.erp5.testProject.xml
0 → 100644
View file @
216c2233
<?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>
product/ERP5/tests/
testTask.py
→
bt5/erp5_project/TestTemplateItem/portal_components/test.erp5.
testTask.py
View file @
216c2233
...
...
@@ -34,7 +34,6 @@ from AccessControl.SecurityManagement import newSecurityManager
from
DateTime
import
DateTime
from
Products.DCWorkflow.DCWorkflow
import
ValidationFailed
from
Products.ERP5Type.tests.Sequence
import
SequenceList
,
Sequence
from
Testing.ZopeTestCase.PortalTestCase
import
PortalTestCase
class
TestTaskMixin
:
...
...
@@ -113,8 +112,6 @@ class TestTaskMixin:
stepSetTaskReportPriceCurrency
\
stepCreateTaskReportLine '
login
=
PortalTestCase
.
login
def
getBusinessTemplateList
(
self
):
"""
"""
...
...
@@ -280,7 +277,6 @@ class TestTaskMixin:
"""
task
=
sequence
.
get
(
'task'
)
project
=
sequence
.
get
(
'project'
)
resource
=
sequence
.
get
(
'resource_list'
)[
0
]
organisation_list
=
sequence
.
get
(
'organisation_list'
)
organisation1
=
organisation_list
[
0
]
organisation2
=
organisation_list
[
1
]
...
...
@@ -302,7 +298,6 @@ class TestTaskMixin:
self
.
stepSetTaskValues
(
sequence
=
sequence
,
sequence_list
=
sequence_list
,
**
kw
)
task
=
sequence
.
get
(
'task'
)
project
=
sequence
.
get
(
'project'
)
resource
=
sequence
.
get
(
'resource_list'
)[
0
]
requirement
=
sequence
.
get
(
'requirement'
)
task
.
edit
(
task_line_resource_value
=
resource
,
...
...
@@ -361,7 +356,6 @@ class TestTaskMixin:
Create task report line and fill with dummy data.
"""
resource
=
sequence
.
get
(
'resource_list'
)[
0
]
portal
=
self
.
getPortal
()
task_report
=
sequence
.
get
(
'task_report'
)
task_report_line
=
task_report
.
newContent
(
portal_type
=
self
.
task_report_line_portal_type
)
...
...
@@ -442,15 +436,15 @@ class TestTaskMixin:
# XXX
# Task line not precisely tested
for
task_line
in
task_content_list
:
task_report_resource_list
=
\
task_report_resource_list
=
\
[
line
.
getResource
()
for
line
in
task_report
.
contentValues
()]
task_report_quantity_list
=
\
task_report_quantity_list
=
\
[
line
.
getQuantity
()
for
line
in
task_report
.
contentValues
()]
task_report_price_list
=
\
task_report_price_list
=
\
[
line
.
getPrice
()
for
line
in
task_report
.
contentValues
()]
self
.
assertTrue
(
task_line
.
getResource
()
in
task_report_resource_list
)
self
.
assertTrue
(
task_line
.
getQuantity
()
in
task_report_quantity_list
)
self
.
assertTrue
(
task_line
.
getPrice
()
in
task_report_price_list
)
self
.
assertTrue
(
task_line
.
getResource
()
in
task_report_resource_list
)
self
.
assertTrue
(
task_line
.
getQuantity
()
in
task_report_quantity_list
)
self
.
assertTrue
(
task_line
.
getPrice
()
in
task_report_price_list
)
for
task_report_line
in
task_report
.
contentValues
(
portal_type
=
'Task Report Line'
):
simulation_movement
=
task_report_line
.
getDeliveryRelatedValue
()
...
...
bt5/erp5_project/TestTemplateItem/portal_components/test.erp5.testTask.xml
0 → 100644
View file @
216c2233
<?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>
product/ERP5/tests/
testTaskReportDivergence.py
→
bt5/erp5_project/TestTemplateItem/portal_components/test.erp5.
testTaskReportDivergence.py
View file @
216c2233
...
...
@@ -31,7 +31,7 @@ from unittest import expectedFailure
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
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
class
TestTaskReportDivergenceMixin
(
TestTaskMixin
,
SecurityTestCase
):
...
...
@@ -290,7 +290,6 @@ class TestTaskReportDivergence(TestTaskReportDivergenceMixin, ERP5TypeTestCase)
"""
Use the divergence API to adopt the decision.
"""
task_report
=
sequence
.
get
(
'task_report'
)
# XXX Check task report solver proposition in UI
def
stepCheckTaskReportDates
(
self
,
sequence
=
None
,
**
kw
):
...
...
bt5/erp5_project/TestTemplateItem/portal_components/test.erp5.testTaskReportDivergence.xml
0 → 100644
View file @
216c2233
<?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>
product/ERP5/tests/
testTaskReporting.py
→
bt5/erp5_project/TestTemplateItem/portal_components/test.erp5.
testTaskReporting.py
View file @
216c2233
...
...
@@ -72,14 +72,14 @@ class TestTaskReportingMixin(ERP5ReportTestCase):
# create organisations
if
not
self
.
portal
.
organisation_module
.
has_key
(
'Organisation_1'
):
org
=
self
.
portal
.
organisation_module
.
newContent
(
self
.
portal
.
organisation_module
.
newContent
(
portal_type
=
'Organisation'
,
reference
=
'Organisation_1'
,
title
=
'Organisation_1'
,
id
=
'Organisation_1'
)
if
not
self
.
portal
.
organisation_module
.
has_key
(
'Organisation_2'
):
org
=
self
.
portal
.
organisation_module
.
newContent
(
self
.
portal
.
organisation_module
.
newContent
(
portal_type
=
'Organisation'
,
reference
=
'Organisation_2'
,
title
=
'Organisation_2'
,
...
...
@@ -87,13 +87,13 @@ class TestTaskReportingMixin(ERP5ReportTestCase):
# create persons
if
not
self
.
portal
.
person_module
.
has_key
(
'Person_1'
):
org
=
self
.
portal
.
person_module
.
newContent
(
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
'Person_1'
,
title
=
'Person_1'
,
id
=
'Person_1'
)
if
not
self
.
portal
.
person_module
.
has_key
(
'Person_2'
):
org
=
self
.
portal
.
person_module
.
newContent
(
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
'Person_2'
,
title
=
'Person_2'
,
...
...
@@ -135,7 +135,7 @@ class TestTaskReportingMixin(ERP5ReportTestCase):
# Create resources
module
=
self
.
portal
.
product_module
if
not
module
.
has_key
(
'development'
):
product
=
module
.
newContent
(
module
.
newContent
(
portal_type
=
'Product'
,
id
=
'development'
,
title
=
'Development'
,
...
...
@@ -143,7 +143,7 @@ class TestTaskReportingMixin(ERP5ReportTestCase):
quantity_unit
=
'day'
)
if
not
module
.
has_key
(
'consulting'
):
product
=
module
.
newContent
(
module
.
newContent
(
portal_type
=
'Product'
,
id
=
'consulting'
,
title
=
'Consulting'
,
...
...
bt5/erp5_project/TestTemplateItem/portal_components/test.erp5.testTaskReporting.xml
0 → 100644
View file @
216c2233
<?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>
bt5/erp5_project/bt/template_test_id_list
0 → 100644
View file @
216c2233
test.erp5.testMilestoneReporting
test.erp5.testProject
test.erp5.testTask
test.erp5.testTaskReportDivergence
test.erp5.testTaskReporting
\ No newline at end of file
bt5/erp5_project/bt/test_dependency_list
0 → 100644
View file @
216c2233
erp5_full_text_mroonga_catalog
erp5_base
erp5_pdm
erp5_simulation
erp5_movement_table_catalog
erp5_configurator_standard_solver
erp5_core_proxy_field_legacy
erp5_simulation_test
erp5_simulation_test_trade_template
\ No newline at end of file
bt5/erp5_project_mysql_innodb_catalog/TestTemplateItem/portal_components/test.erp5.testOptimizedMilestoneReporting.py
0 → 100644
View file @
216c2233
#############################################################################
#
# Copyright 2009 Nexedi SA Contributors. All Rights Reserved.
# Sebastien Robin <seb@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# 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.
#
##############################################################################
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5ReportTestCase
from
erp5.component.test.testMilestoneReporting
import
MilestoneReportingMixin
class
TestOptimisedMilestoneReporting
(
MilestoneReportingMixin
,
ERP5ReportTestCase
):
"""Same as above, with additionnal business template adding extra
tables in order to do optimisations
"""
def
getTitle
(
self
):
return
"Optimised Milestone Reporting"
def
getBusinessTemplateList
(
self
):
"""Returns list of BT to be installed."""
return
self
.
business_template_list
+
(
'erp5_project_mysql_innodb_catalog'
,)
def
testMilestoneReport
(
self
):
self
.
checkMilestoneReport
(
optimised
=
True
)
\ No newline at end of file
bt5/erp5_project_mysql_innodb_catalog/TestTemplateItem/portal_components/test.erp5.testOptimizedMilestoneReporting.xml
0 → 100644
View file @
216c2233
<?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>
testOptimizedMilestoneReporting
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
test.erp5.testOptimizedMilestoneReporting
</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>
bt5/erp5_project_mysql_innodb_catalog/bt/template_test_id_list
0 → 100644
View file @
216c2233
test.erp5.testOptimizedMilestoneReporting
\ No newline at end of file
bt5/erp5_project_mysql_innodb_catalog/bt/test_dependency_list
0 → 100644
View file @
216c2233
erp5_full_text_mroonga_catalog
erp5_trade
erp5_knowledge_pad
erp5_accounting
erp5_base
erp5_pdm
erp5_simulation
erp5_movement_table_catalog
erp5_configurator_standard_trade_template
erp5_configurator_standard_solver
erp5_core_proxy_field_legacy
erp5_simulation_test
erp5_simulation_test_trade_template
erp5_project
\ No newline at end of file
bt5/erp5_research_item/TestTemplateItem/portal_components/test.erp5.testResearchItemSummaryReport.py
View file @
216c2233
...
...
@@ -26,7 +26,7 @@
##############################################################################
from
DateTime
import
DateTime
from
Products.ERP5.tests
.testTaskReporting
import
TestTaskReportingMixin
from
erp5.component.test
.testTaskReporting
import
TestTaskReportingMixin
class
TestResearchItemSummaryReport
(
TestTaskReportingMixin
):
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment