title: How to mock nested functions?
body: <p>The mocking library I use is ... <a href="http://www.voidspace.org.uk/python/mock/">mock</a>.</p>
  
  <p>I came across this "mock nested functions" problem when I tried to write test case for a function(legacy code).</p>
  
  <p>This function used a very complex nested function with heavy dependencies on other modules.</p>
  
  <p>I wonder if it's possible to mock nested functions with <code>mock</code>.</p>