Commit 4c2809ad authored by Sebastien Robin's avatar Sebastien Robin

correctly quote titles, before a space in title was introducing mess

parent f552f88e
...@@ -276,7 +276,7 @@ class ERP5ProjectUnitTestDistributor(XMLObject): ...@@ -276,7 +276,7 @@ class ERP5ProjectUnitTestDistributor(XMLObject):
def _getTestNodeFromTitle(self, node_title): def _getTestNodeFromTitle(self, node_title):
test_node_list = self._getTestNodeModule().searchFolder( test_node_list = self._getTestNodeModule().searchFolder(
portal_type='Test Node', title="=%s" % node_title) portal_type='Test Node', title="='%s'" % node_title)
assert len(test_node_list) == 1, "We found %i test nodes for %s" % ( assert len(test_node_list) == 1, "We found %i test nodes for %s" % (
len(test_node_list), node_title) len(test_node_list), node_title)
test_node = test_node_list[0].getObject() test_node = test_node_list[0].getObject()
...@@ -284,7 +284,7 @@ class ERP5ProjectUnitTestDistributor(XMLObject): ...@@ -284,7 +284,7 @@ class ERP5ProjectUnitTestDistributor(XMLObject):
def _getTestSuiteFromTitle(self, suite_title): def _getTestSuiteFromTitle(self, suite_title):
test_suite_list = self._getTestSuiteModule().searchFolder( test_suite_list = self._getTestSuiteModule().searchFolder(
portal_type='Test Suite', title="=%s" % suit_tile, validation_state="validated") portal_type='Test Suite', title="='%s'" % suit_tile, validation_state="validated")
assert len(test_suite_list) == 1, "We found %i test suite for %s" % ( assert len(test_suite_list) == 1, "We found %i test suite for %s" % (
len(test_suite_list), name) len(test_suite_list), name)
test_suite = test_suite_list[0].getObject() test_suite = test_suite_list[0].getObject()
......
...@@ -91,7 +91,7 @@ class TaskDistributionTool(BaseTool): ...@@ -91,7 +91,7 @@ class TaskDistributionTool(BaseTool):
def createTestResultLineList(test_result, test_name_list): def createTestResultLineList(test_result, test_name_list):
duration_list = [] duration_list = []
previous_test_result_list = portal.test_result_module.searchFolder( previous_test_result_list = portal.test_result_module.searchFolder(
title='=%s' % test_result.getTitle(), title='="%s"' % test_result.getTitle(),
sort_on=[('creation_date','descending')], sort_on=[('creation_date','descending')],
simulation_state='stopped', simulation_state='stopped',
limit=1) limit=1)
...@@ -124,7 +124,7 @@ class TaskDistributionTool(BaseTool): ...@@ -124,7 +124,7 @@ class TaskDistributionTool(BaseTool):
int_index, reference = revision int_index, reference = revision
result_list = portal.test_result_module.searchFolder( result_list = portal.test_result_module.searchFolder(
portal_type="Test Result", portal_type="Test Result",
title="=%s" % test_title, title='="%s"' % test_title,
sort_on=(("creation_date","descending"),), sort_on=(("creation_date","descending"),),
limit=1) limit=1)
if result_list: if result_list:
......
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