title: Need to mock out some base class behavior in a python test case
body: <p>My title is fairly descriptive, but here goes.
  Suppose I have this setup.</p>
  
  <pre><code>class BaseClass(object):
      def __init__(self):
          pass
      def base_function(self, param="Hello World"):
          print param
  
  #multiple inheritance probably irrelevant but my problem deals with it
  class DerivedClass(BaseClass, AnotherBaseClass):
      def __init__(self):
          pass
      def advanced_function(self):
          #blah blah blah
          #code code code
          self.base_function()
  </code></pre>
  
  <p>Now, I have a situation where I am testing a derived class, but in doing so, I need to ensure that it's base class methods are called. I tried doing something like this</p>
  
  <pre><code>from mock import MagicMock
  
  d = DerivedClass()
  super(DerivedClass, d).base_function = MagicMock()
  d.advanced_function()
  super(DerivedClass, d).base_function.assert_called()
  </code></pre>
  
  <p>I'm 100% sure this setup is wrong, because</p>
  
  <pre><code>AttributeError: 'super' object has no attribute 'base_function'
  </code></pre>
  
  <p>I know I'm doing something wrong with super, anyone have an idea?</p>