title: Testing constructor using mock
body: <p>I need to test that my class's constructor calls some method</p>
  
  <pre><code>class ProductionClass:
     def __init__(self):
         self.something(1, 2, 3)
  
     def method(self):
         self.something(1, 2, 3)
  
     def something(self, a, b, c):
         pass 
  </code></pre>
  
  <p>This class is from 'unittest.mock — getting started'. As written there I can make sure that 'method' called 'something' as follows.</p>
  
  <pre><code>real = ProductionClass()
  real.something = MagicMock()
  real.method()
  real.something.assert_called_once_with(1, 2, 3)
  </code></pre>
  
  <p>But how to test the same for constructor?</p>