Commit 4aa2fbb8 authored by Tristan Cavelier's avatar Tristan Cavelier

Remove useless code

- Two methods defined twice with the same code in the same script
parent fe23cc8e
No related merge requests found
...@@ -262,44 +262,6 @@ class ERP5ProjectUnitTestDistributor(XMLObject): ...@@ -262,44 +262,6 @@ 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=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") security.declarePublic("startTestSuite")
def startTestSuite(self,title, computer_guid=None, batch_mode=0): def startTestSuite(self,title, computer_guid=None, batch_mode=0):
""" """
......
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