Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
Hamza
erp5-Boxiang
Commits
4aa2fbb8
Commit
4aa2fbb8
authored
9 years ago
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove useless code
- Two methods defined twice with the same code in the same script
parent
fe23cc8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
38 deletions
+0
-38
product/ERP5/Document/ERP5ProjectUnitTestDistributor.py
product/ERP5/Document/ERP5ProjectUnitTestDistributor.py
+0
-38
No files found.
product/ERP5/Document/ERP5ProjectUnitTestDistributor.py
View file @
4aa2fbb8
...
...
@@ -262,44 +262,6 @@ class ERP5ProjectUnitTestDistributor(XMLObject):
test_suite_list
.
sort
(
key
=
getTestSuiteSortKey
)
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
=
SimpleQuery
(
comparison_operator
=
'='
,
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"
)
def
startTestSuite
(
self
,
title
,
computer_guid
=
None
,
batch_mode
=
0
):
"""
...
...
This diff is collapsed.
Click to expand it.
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