Skip to content

Commit

Permalink
fix upvote mocking
Browse files Browse the repository at this point in the history
  • Loading branch information
petrkalos committed Dec 6, 2024
1 parent ce71471 commit 65d625a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/test_permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -93,6 +93,7 @@ def test_permissions(
field,
perm_type,
request,
mocker,
common_mocks,
):
fid = request.node.callspec.id.split('-')[-1]
Expand Down

0 comments on commit 65d625a

Please sign in to comment.