title: Why am I getting a TypeError when running assert_has_calls()?
body: <p>I am trying to make a simple assert_has_calls() call while using a pytest mock via an @patch decorator. I am instead getting an error message. Below is the snippet of code I'm running in my test script.</p>
  <pre><code>calls = [mock_draw_discard_pile_attempt_check_meld_match(P2, True), mock_draw_discard_pile_attempt_check_meld_match(P2)]
  mock_draw_discard_pile_attempt_check_meld_match.assert_has_calls(calls)
  </code></pre>
  <p>The error message I am getting is below.</p>
  <pre><code>        draw_discard_pile_attempt(P2, True)
          mock_discard_pile_is_frozen.assert_called()
          calls = [mock_draw_discard_pile_attempt_check_meld_match(P2, True), mock_draw_discard_pile_attempt_check_meld_match(P2)]
  &gt;       mock_draw_discard_pile_attempt_check_meld_match.assert_has_calls(calls)
  
  test_Canasta_replica.py:361:
  _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  c:\users\jmt3e\anaconda3\lib\unittest\mock.py:211: in assert_has_calls
      return mock.assert_has_calls(*args, **kwargs)
  c:\users\jmt3e\anaconda3\lib\unittest\mock.py:938: in assert_has_calls
      expected = [self._call_matcher(c) for c in calls]
  c:\users\jmt3e\anaconda3\lib\unittest\mock.py:938: in &lt;listcomp&gt;
      expected = [self._call_matcher(c) for c in calls]
  _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  
  self = &lt;MagicMock name='draw_discard_pile_attempt_check_meld_match' spec='function' id='2654848555088'&gt;, _call = None
  
      def _call_matcher(self, _call):
          &quot;&quot;&quot;
          Given a call (or simply an (args, kwargs) tuple), return a
          comparison key suitable for matching with other calls.
          This is a best effort method which relies on the spec's signature,
          if available, or falls back on the arguments themselves.
          &quot;&quot;&quot;
  
          if isinstance(_call, tuple) and len(_call) &gt; 2:
              sig = self._get_call_signature_from_name(_call[0])
          else:
              sig = self._spec_signature
  
          if sig is not None:
  &gt;           if len(_call) == 2:
  E           TypeError: object of type 'NoneType' has no len()
  
  c:\users\jmt3e\anaconda3\lib\unittest\mock.py:854: TypeError
  </code></pre>