title: Patch a method outside python class
body: <p>I am interested in patching a method which is called by another method in one file. Example - original.py file contains - </p>
  
  <pre><code>def A():
     a = 10
     b = 5
     return a*b;
  
  def B():
    c = A()
    return c* 10
  </code></pre>
  
  <p>I want to write unit test for this file , say call it test.py</p>
  
  <pre><code>import mock
  import unittest
  
  class TestOriginal(unitest.TestCase):
      def test_Original_method(self):
         with patch(''):
  </code></pre>
  
  <p>How can I use patch and mock modules to test original.py. I want A() to always return MagicMock() object instead of an integer.</p>