title: How to extract parameters stored in mock.call
body: <p>I am unit testing the following functions:</p>
  
  <pre><code>import uuid
  
  
  def process_name(id, name, weight):
      print('process_item:', id, name, weight)
  
  
  def process_list(names):
      for (name, weight) in names:
          id = uuid.uuid4()
      process_name(id, name, weight)
  </code></pre>
  
  <p>My unit test looks as follows:</p>
  
  <pre><code>import unittest
  from mock import patch, call
  import SomePackage.SomeModule
  
  
  class MyTestCase(unittest.TestCase):
      def test_something(self):
          items = [('Joe', 190), ('Dan', 200)]
          with patch('SomePackage.SomeModule.process_name') as mock_process_name:
              SomePackage.SomeModule.process_list(items)
  </code></pre>
  
  <p>I cannot match the whole <code>mock_calls</code> thing, because the first parameter submitted to it is a guid, and as such it will be different every time I call the function:</p>
  
  <pre><code>print(mock_process_name.mock_calls)
  [call(UUID('some randomish guid'), 'Joe', 190),
   call(UUID('some other guid'), 'Dan', 200)]
  </code></pre>
  
  <p>I want to extract the parameters, and only match the non-volatile ones:</p>
  
  <pre><code> print(mock_process_name.mock_calls[0][1][1:])
   print(mock_process_name.mock_calls[1][1][1:])
   ('Joe', 190)
   ('Dan', 200)
  </code></pre>
  
  <p>I know that I can also mock the thing which returns guids, and provide a fixed list of values in its side_effect. However, I feel quite lazy needing to mock too many things like <code>uuid.uuid4()</code>, <code>datetime.now()</code> and such. This is why I am looking for an alternative to mocking each and every volatile function.</p>
  
  <p>Is there a more readable alternative to <code>mock_calls[0][1][1:]</code>?</p>