From 65d625abc961f6e34e30e7c1828836764de04580 Mon Sep 17 00:00:00 2001 From: Petros Kalos Date: Fri, 6 Dec 2024 15:59:51 +0200 Subject: [PATCH] fix upvote mocking --- tests/test_permissions.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_permissions.py b/tests/test_permissions.py index 015c445a8..7f3c663d3 100644 --- a/tests/test_permissions.py +++ b/tests/test_permissions.py @@ -59,10 +59,10 @@ def setup_networks(mock_storage, **kwargs): setup_Environment_networks = setup_networks -def setup_Mutation_upVote(**kwargs): - patch( +def setup_Mutation_upVote(mocker, **kwargs): + mocker.patch( 'dataall.modules.vote.services.vote_service.get_vote_type', return_value={'permission': TARGET_TYPE_PERM} - ).start() + ) @pytest.mark.parametrize('field', ALL_PARAMS) @@ -93,6 +93,7 @@ def test_permissions( field, perm_type, request, + mocker, common_mocks, ): fid = request.node.callspec.id.split('-')[-1]