Why not use mock.patch instead of doing it by hand?