instead of passing every mock  every time to this function  you could do something like that def setup self patcher mock patch object someobjcet qwerty  self mock request patcher start def configure mock self responses self mock request return value fake response remember to stop all mocks in teardown 