I have a problem in writing integration test for some function that calls other function which is decorated. Suppose the following definitions: I need to write test to ensure that any exception raised inside problematic_func will not be propagated to func_under_test. For this reason, I used mocking like below: Problem is that I can’t pass this test. Patching problematic_func caused