title: Python mock returns a MagicMock object instead of a specified result value
body: <p>I want to mock test this function:</p>
  
  <pre><code>def foo():
    client = boto3.client(some_args)
    return client.func_A(other_args)
  </code></pre>
  
  <p>So I mock boto3 in my test:</p>
  
  <pre><code>def test_foo():
    with patch('boto3') as mock_boto3:
      mock_boto3.return_value.client.return_value.func_A.return_value = 'test_val'
      foo()
  </code></pre>
  
  <p>The proiblem with this is that <code>func_A</code> returns a <code>MagicMock</code> object instead of the specified return value. What am I doing wrong?</p>
  
  <p><code>&lt;MagicMock name='boto3.client().func_A()' id='140131668642896'&gt;</code></p>