You can use patch() as a class decorator, not just as a function decorator. You can then pass in the mocked function as before: @patch('mymodule.
確定! 回上一頁