From e8a6fc84ac3cb5b1d3bef2b99a8ace9079745239 Mon Sep 17 00:00:00 2001 From: Ayush Tiwari <ayush.tiwari@nexedi.com> Date: Tue, 10 Nov 2015 20:55:23 +0100 Subject: [PATCH] erp5_data_notebook bt5: Refactor test with striping the result from function call --- .../portal_components/test.erp5.testExecuteJupyter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bt5/erp5_data_notebook/TestTemplateItem/portal_components/test.erp5.testExecuteJupyter.py b/bt5/erp5_data_notebook/TestTemplateItem/portal_components/test.erp5.testExecuteJupyter.py index dbaaf8d434..a0be67f4d7 100644 --- a/bt5/erp5_data_notebook/TestTemplateItem/portal_components/test.erp5.testExecuteJupyter.py +++ b/bt5/erp5_data_notebook/TestTemplateItem/portal_components/test.erp5.testExecuteJupyter.py @@ -381,7 +381,7 @@ import sys # Call Base_displayImage from inside of Base_runJupyter jupyter_code = """ -image = context.portal_catalog.getResultValue(portal_type='Image',reference=%s) +image = context.portal_catalog.getResultValue(portal_type='Image',reference='%s') context.Base_displayImage(image_object=image) """%reference @@ -391,5 +391,5 @@ context.Base_displayImage(image_object=image) old_local_variable_dict=local_variable_dict ) - self.assertEquals(result['result_string'], base64.b64encode(data)) + self.assertEquals(result['result_string'].rstrip(), base64.b64encode(data)) self.assertEquals(result['mime_type'], 'image/png') -- 2.30.9