title: Python mock method call arguments display the last state of a list
body: <p>I have a function which takes a list as a parameter. The function is called multiple times and every time some of the list values are updated. The mock object I am using to capture the call arguments, always shows the latest values in the list for all call arguments. The following code shows the problem.</p>
  
  <pre><code>from mock import MagicMock
  
  def multiple_calls_test():
      m = MagicMock()
      params = [0, 'some_fixed_value', 'some_fixed_value']
      for i in xrange(1,10):
          params[0] = i
          m(params)
      for args in m.call_args_list:
          print args[0][0]
  
  multiple_calls_test()
  </code></pre>
  
  <p>And here is the output, Notice all calls have 9 as the first list element.</p>
  
  <pre><code>[9, 'some_fixed_value', 'some_fixed_value']
  [9, 'some_fixed_value', 'some_fixed_value']
  [9, 'some_fixed_value', 'some_fixed_value']
  [9, 'some_fixed_value', 'some_fixed_value']
  [9, 'some_fixed_value', 'some_fixed_value']
  [9, 'some_fixed_value', 'some_fixed_value']
  [9, 'some_fixed_value', 'some_fixed_value']
  [9, 'some_fixed_value', 'some_fixed_value']
  [9, 'some_fixed_value', 'some_fixed_value']
  </code></pre>
  
  <p>Is there a way to force the mock object to make a copy of list argument instead of holding the reference to the actual list? Or some other way of asserting the correct value for every method execution? Thanks.</p>