changeset 25729b538f2d in modules/marketing_automation:default
details:
https://hg.tryton.org/modules/marketing_automation?cmd=changeset&node=25729b538f2d
description:
Use start and stop methods of patch in scenario
This ensure that the modification on the object are removed at the end
of the
scenario.
issue10422
review332891002
diffstat:
tests/scenario_marketing_automation.rst | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (16 lines):
diff -r 0b02a5925fd8 -r 25729b538f2d tests/scenario_marketing_automation.rst
--- a/tests/scenario_marketing_automation.rst Mon May 03 15:56:00 2021 +0200
+++ b/tests/scenario_marketing_automation.rst Sat May 15 09:22:28 2021 +0200
@@ -13,9 +13,10 @@
Patch sendmail_transactional::
- >>> from unittest.mock import MagicMock
+ >>> from unittest.mock import patch
>>> from trytond.modules.marketing_automation import marketing_automation
- >>> marketing_automation.sendmail_transactional = smtp_calls = MagicMock()
+ >>> smtp_calls = patch.object(
+ ... marketing_automation, 'sendmail_transactional').start()
Activate modules::