From 1aa4eceb6061d314859d2dcdb04bd68bf46b352b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 16 Sep 2020 23:22:06 +0200 Subject: [PATCH] Test PYSON condition issue9583 review314261002 --- tests/scenario_marketing_automation.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/scenario_marketing_automation.rst b/tests/scenario_marketing_automation.rst index 8098589973..b529a37d94 100644 --- a/tests/scenario_marketing_automation.rst +++ b/tests/scenario_marketing_automation.rst @@ -7,6 +7,7 @@ Imports:: >>> import re >>> from proteus import Model, Wizard >>> from proteus.config import get_config + >>> from trytond.pyson import Eval, PYSONEncoder >>> from trytond.tests.tools import activate_modules >>> from trytond.tools import file_open @@ -45,6 +46,8 @@ Create the running scenario:: >>> root_activity.parent = scenario >>> root_activity.action = 'send_email' >>> root_activity.email_title = "Hello" + >>> root_activity.condition = PYSONEncoder().encode( + ... Eval('self', {}).get('active')) >>> with file_open('marketing_automation/tests/email.html', mode='r') as fp: ... root_activity.email_template = fp.read() >>> root_activity.save()