changeset 42c2825b3803 in modules/web_shop_vue_storefront:5.8
details: 
https://hg.tryton.org/modules/web_shop_vue_storefront?cmd=changeset&node=42c2825b3803
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 2b749711d629c35c1d2025fddb053ddb3bfa5edd)
diffstat:

 tests/scenario_web_shop_vue_storefront.rst |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (22 lines):

diff -r c2718a436c00 -r 42c2825b3803 tests/scenario_web_shop_vue_storefront.rst
--- a/tests/scenario_web_shop_vue_storefront.rst        Fri Feb 19 21:25:40 
2021 +0100
+++ b/tests/scenario_web_shop_vue_storefront.rst        Sat May 15 09:22:28 
2021 +0200
@@ -5,7 +5,7 @@
 Imports::
 
     >>> from decimal import Decimal
-    >>> from unittest.mock import MagicMock, ANY
+    >>> from unittest.mock import MagicMock, ANY, patch
 
     >>> from proteus import Model
     >>> from trytond.tests.tools import activate_modules
@@ -21,7 +21,8 @@
 
     >>> from trytond.modules.web_shop_vue_storefront import web
     >>> es = MagicMock()
-    >>> web.VSFElasticsearch = MagicMock(return_value=es)
+    >>> _ = patch.object(
+    ...     web, 'VSFElasticsearch', return_value=es).start()
 
 Install web_shop_vue_storefront::
 

Reply via email to