title: Override parent class init value when using unittest mock
body: <p>I have a class that is initialized like so:</p>
  <pre><code>class Parent:
      def __init__(self, id):
          self.network = id
          self.requester = CompanyRequest()
  </code></pre>
  <p>To run tests for this class, I am mocking <code>CompanyRequest</code> so that I can define its return values. Since <code>Parent</code> only takes in <code>id</code> as a parameter I define a subclass:</p>
  <pre><code>class MockParent(Parent):
      @patch(&quot;CompanyRequest&quot;)
      def __init__(self, id, mock_request):
          self.network = id
          self.requester = mock_request
  </code></pre>
  <p>This works fine when testing and gives me the expected behavior. My issue is that for code review I get an error saying <code>__init__ method from base class 'Parent' is not called</code>. However if I call <code>super().__init__(id)</code> then it will try to call the real <code>CompanyRequest</code> instead of the <code>mock_request</code>, which causes all sorts of problems since the whole point of this is to test the <code>Parent</code> class methods on known return values.</p>
  <p>Is there a way to override the parent <code>__init__</code> function in a subclass? Or possibly a way to mock/bypass it?</p>