title: Patch: AssertionError: Expected '...' to have been called once. Called 0 times
body: <p>I have the following class to be tested.</p>
  <p><strong>mod1/file1.py</strong></p>
  <pre><code>@dataclass
  class Base(metaclass=ABCMeta):
  
      account: Account
      ec2_id: str = &quot;&quot;
  
      def start(self):
          self.account.session.resource(&quot;ec2&quot;).instances.filter(
              InstanceIds=[self.ec2_id]
          ).start()
  </code></pre>
  <p>And I created the following test,</p>
  <pre><code>from unittest.mock import Mock, patch
  
      @patch('mod1.file1.Base')
      def test_start(sut):
          sut.account = Mock()
          sut.ec2_id = 'test'
          sut.start()  # sut.return_value.start() gets the same error
          sut.account.session.resource('ec2').instances.filter.assert_called_once()
  </code></pre>
  <p>However, the test failed with error</p>
  <pre><code>AssertionError: Expected 'filter' to have been called once. Called 0 times.
  </code></pre>