changeset 5f50c5c869c8 in modules/marketing_automation:6.0
details:
https://hg.tryton.org/modules/marketing_automation?cmd=changeset&node=5f50c5c869c8
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
(grafted from 25729b538f2df592e6a370aa0c75a6b2ac1a1684)
diffstat:
tests/scenario_marketing_automation.rst | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (16 lines):
diff -r d36281beceb0 -r 5f50c5c869c8 tests/scenario_marketing_automation.rst
--- a/tests/scenario_marketing_automation.rst Mon May 03 15:55:59 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::