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
Titouan Soulard
erp5
Commits
2bb15572
Commit
2bb15572
authored
Jul 30, 2014
by
Rafael Monnerat
Committed by
Jérome Perrin
Nov 05, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix applied in projection, else nothing works on erp5testnode
parent
7628f15e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
product/ERP5/Document/ERP5ProjectUnitTestDistributor.py
product/ERP5/Document/ERP5ProjectUnitTestDistributor.py
+36
-0
No files found.
product/ERP5/Document/ERP5ProjectUnitTestDistributor.py
View file @
2bb15572
...
@@ -257,6 +257,42 @@ class ERP5ProjectUnitTestDistributor(XMLObject):
...
@@ -257,6 +257,42 @@ class ERP5ProjectUnitTestDistributor(XMLObject):
test_suite_list
.
sort
(
key
=
getTestSuiteSortKey
)
test_suite_list
.
sort
(
key
=
getTestSuiteSortKey
)
return
test_suite_list
return
test_suite_list
security
.
declarePublic
(
"getTestType"
)
def
getTestType
(
self
,
batch_mode
=
0
):
"""
getTestType : return a string defining the test type
"""
return
'UnitTest'
security
.
declarePublic
(
"subscribeNode"
)
def
subscribeNode
(
self
,
title
,
computer_guid
,
batch_mode
=
0
):
"""
subscribeNode doc
"""
test_node_module
=
self
.
_getTestNodeModule
()
portal
=
self
.
getPortalObject
()
tag
=
"%s_%s"
%
(
self
.
getRelativeUrl
(),
title
)
if
portal
.
portal_activities
.
countMessageWithTag
(
tag
)
==
0
:
test_node_list
=
test_node_module
.
searchFolder
(
portal_type
=
"Test Node"
,
title
=
title
)
assert
len
(
test_node_list
)
in
(
0
,
1
),
"Unable to find testnode : %s"
%
title
test_node
=
None
if
len
(
test_node_list
)
==
1
:
test_node
=
test_node_list
[
0
].
getObject
()
if
test_node
.
getValidationState
()
!=
'validated'
:
try
:
test_node
.
validate
()
except
e
:
LOG
(
'Test Node Validate'
,
ERROR
,
'%s'
%
e
)
if
test_node
is
None
:
test_node
=
test_node_module
.
newContent
(
portal_type
=
"Test Node"
,
title
=
title
,
computer_guid
=
computer_guid
,
specialise
=
self
.
getRelativeUrl
(),
activate_kw
=
{
'tag'
:
tag
})
self
.
activate
(
after_tag
=
tag
).
optimizeConfiguration
()
test_node
.
setPingDate
()
return
test_node
return
None
security
.
declarePublic
(
"startTestSuite"
)
security
.
declarePublic
(
"startTestSuite"
)
def
startTestSuite
(
self
,
title
,
computer_guid
=
None
,
batch_mode
=
0
):
def
startTestSuite
(
self
,
title
,
computer_guid
=
None
,
batch_mode
=
0
):
"""
"""
...
...
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