

def patch(self, *args, **kwargs):
    patcher = mock.patch(*args, **kwargs)
    m = patcher.start()
    self.addCleanup(patcher.stop)
    return m

dataset/ETHPy150Open openstack/fuel-devops/devops/tests/driver/libvirt/base.py LibvirtTestCase.patch/original