Mocking a function when the function passed in as an argument
I’m trying to write a unit test for some Python code and I’m having difficulty patching a function to have a fixed return value when said function is being called not directly but as an argument.
drop pytest-mock and use unittest.mock with pytest
What is the fundamental difference between pytest-mock and unittest.mock and why is it worth it or not to remove pytest-mock from dependencies, given the fact that the standard library fully implements the functionality of pytest-mock, unless all this is placed in the mocker fixture?