title: Python @patch not working
body: <p>I am trying to test a method that within it creates an instance of another class, I am attempting to mock the creation of the inner class... That is not working for me. I tried replicating the problem to a simplified case - and still no go. Here is the simplified case:</p>
  
  <p>I have a directory named <code>pymock</code> with a <code>__init__.py</code> in it. Other than that there are these 3 files:</p>
  
  <p><strong>foo.py</strong></p>
  
  <pre><code>#!/usr/bin/python
  class Foo(object):
      def foo1(self):
          return 1
  </code></pre>
  
  <p><strong>goo.py</strong></p>
  
  <pre><code>#!/usr/bin/python
  from foo import Foo
  
  
  class Goo(object):
      def goo1(self):
          f = Foo()
          return f.foo1()
  </code></pre>
  
  <p><strong>goo_test.py</strong></p>
  
  <pre><code>#!/usr/bin/python
  from mock import patch, Mock
  from nose.tools import assert_equal
  
  from goo import Goo
  
  
  class TestGoo(object):
      def setup(self):
          self.goo = Goo()
  
      @patch('pymock.foo.Foo', autospec=True)
      def test_goo1(self, foo1_mock):
          foo_instance = Mock()
          foo1_mock.return_value = foo_instance
          foo_instance.foo1.return_value = 11
          assert_equal(11, self.goo.goo1())
  </code></pre>
  
  <p>Thanks in advance!</p>