Commit 77d0a094 authored by Jérome Perrin's avatar Jérome Perrin

test_result: Display test node title from test result line

Now that testnode client is supposed to pass test node title,
make sure that on the server side we can display this information.
parent e17936a4
Pipeline #11463 passed with stage
in 0 seconds
......@@ -91,6 +91,7 @@
<string>my_title</string>
<string>my_duration</string>
<string>my_parent_int_index</string>
<string>my_source_title</string>
<string>your_hide_expected_failure</string>
</list>
</value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>editable</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_source_title</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_string_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Test Node</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -534,7 +534,7 @@ class TestTaskDistribution(TaskDistributionTestCase):
"""
We will check the method createTestResult of distributor
"""
self._createTestNode()
test_node, = self._createTestNode()
self.tic()
test_result_path, revision = self._createTestResult()
self.assertEqual("r0=a,r1=a", revision)
......@@ -558,7 +558,11 @@ class TestTaskDistribution(TaskDistributionTestCase):
self.assertEqual(2, len(line_list))
self.assertEqual(set(['testFoo', 'testBar']), set([x.getTitle() for x
in line_list]))
line_url, _ = self.tool.startUnitTest(test_result_path)
line_url, _ = self.tool.startUnitTest(test_result_path, node_title=test_node.getTitle())
# when node_title is passed to startUnitTest, we have a relation from test result line
# to test node
test_result_line = self.portal.restrictedTraverse(line_url)
self.assertEqual(test_result_line.getSourceValue(), test_node)
result = self._createTestResult(test_list=['testFoo', 'testBar'])
self.assertEqual((test_result_path, revision), result)
self.tool.startUnitTest(test_result_path)
......
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