changeset 58b56e4b2cab in modules/marketing_automation:default
details:
https://hg.tryton.org/modules/marketing_automation?cmd=changeset;node=58b56e4b2cab
description:
Test PYSON condition
issue9583
review314261002
diffstat:
tests/scenario_marketing_automation.rst | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diffs (20 lines):
diff -r a1f029bafea2 -r 58b56e4b2cab tests/scenario_marketing_automation.rst
--- a/tests/scenario_marketing_automation.rst Wed Sep 16 23:21:37 2020 +0200
+++ b/tests/scenario_marketing_automation.rst Wed Sep 16 23:22:06 2020 +0200
@@ -7,6 +7,7 @@
>>> 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 @@
>>> 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()