title: Mocking: wrapping method and receiving args at call time
body: <p>I wonder wether it's possible to patch a method somewhere deep inside code I don't own in a way that allows me to receive the args the method will receive right before or after that method is called without having an actual reference to the object on which the method is being called.</p>
  
  <p>I want to be able to do something like</p>
  
  <pre><code>def wrapping(method, *args, **kwargs):
      # do stuff
      rv = method(*args, **kwargs)
      # more stuff
      return rv
  
  
  with mock.patch('path.to.The.method', wraps=wrapping):
      code_that_eventually_calls_the_method()
  </code></pre>
  
  <p>and then I get dropped into wrapping when the method is eventually called, but I can call the mocked method without having a reference to its object beforehand in the testcode. Is this achievable?</p>