title: Python unittest patch mock entire class
body: <p>I have a class that I want to patch in my unittests.</p>
  <pre><code>class OriginalClass():
     def method_a():
       # do something
     
     def method_b():
       # do another thing
  </code></pre>
  <p>Now I created another class to patch it with, so the code for patching it is like</p>
  <pre><code>class MockClass(OriginalClass):
      def method_a():
          # This will override the original method and return custom response for testing.
  
  patcher = patch('OriginalClass', new=MockClass)
  mock_instance = patcher.start()    
  </code></pre>
  <p>This works exactly as I want it to and I can return whatever responses required for my unittests.</p>
  <p>Now this issue is when I want to verify that a method is called with the right parameters in the unittests.
  I tried</p>
  <pre><code>mock_instance.method_a.assert_called_once()
  </code></pre>
  <p>But it fail with error <code>AttributeError: 'function' object has no attribute 'assert_called_once'</code>.</p>
  <p>How can I test the method calls here?</p>