Commit 5fd03c12 authored by Ayush Tiwari's avatar Ayush Tiwari

erp5_data_notebook bt5: Use getResultValue in testExecuteJupyter to get the 1st matching result

parent 5a0d4baf
...@@ -167,19 +167,17 @@ class TestExecuteJupyter(SecurityTestCase): ...@@ -167,19 +167,17 @@ class TestExecuteJupyter(SecurityTestCase):
) )
self.tic() self.tic()
notebook_list = portal.portal_catalog( notebook = portal.portal_catalog.getResultValue(
portal_type='Data Notebook', portal_type='Data Notebook',
reference=reference reference=reference
) )
notebook_message_search_result = portal.portal_catalog( notebook_message_search_result = portal.portal_catalog.getResultValue(
portal_type='Data Notebook', portal_type='Data Notebook',
reference=reference,
notebook_code=python_expression notebook_code=python_expression
) )
self.assertEquals(notebook.getId(), notebook_message_search_result.getId())
result = [obj.getId() for obj in notebook_message_search_result]
self.assertIn(notebook_list[0].getId(), result)
def testBaseExecuteJupyterErrorHandling(self): def testBaseExecuteJupyterErrorHandling(self):
""" """
......
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