changeset c0e3dd824b10 in modules/marketing_automation:5.6
details: 
https://hg.tryton.org/modules/marketing_automation?cmd=changeset&node=c0e3dd824b10
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 e46172b5831f -r c0e3dd824b10 tests/scenario_marketing_automation.rst
--- a/tests/scenario_marketing_automation.rst   Wed Mar 03 18:30:57 2021 +0100
+++ b/tests/scenario_marketing_automation.rst   Sat May 15 09:22:28 2021 +0200
@@ -12,9 +12,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()
 
 Install marketing_automation::
 

Reply via email to