changeset 2b749711d629 in modules/web_shop_vue_storefront:default
details:
https://hg.tryton.org/modules/web_shop_vue_storefront?cmd=changeset&node=2b749711d629
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_web_shop_vue_storefront.rst | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (22 lines):
diff -r 6de52bf748f7 -r 2b749711d629 tests/scenario_web_shop_vue_storefront.rst
--- a/tests/scenario_web_shop_vue_storefront.rst Mon May 03 16:08:50
2021 +0200
+++ 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::