def foo(self, n):
    return self.bar(n)

def bar(self, n):
    return n + 2


class PotatoTest(TestCase):

    def test_something(self):
        spud = Potato()
with patch.object(Potato, 'foo', wraps=spud.foo) as mock:
    forty_two = spud.spam(n=40)
mock.assert_called_once_with(n=40)
self.assertEqual(forty_two, 42)
python mock - patching a method without obstructing implementation