title: Mocking - How do I raise exception on the caller?
body: <p>Suppose this is the code</p>
  
  <pre><code>def move(*args, **kwargs):   
      try:
          shutil.move(source, destination)
      except Exception as e:
          raise e
  </code></pre>
  
  <p>and in my tests.py</p>
  
  <pre><code>@patch.object(shutil, 'move')
  def test_move_catch_exception(self, mock_rmtree):
      ''' Tests moving a target hits exception. '''
      mock_rmtree.side_effect = Exception('abc')
      self.assertRaises(Exception, move,
                               self.src_f, self.src_f, **self.kwargs)
  </code></pre>
  
  <p>It said this</p>
  
  <pre><code>  File "unittests.py", line 84, in test_move_catch_exception
      self.src_f, self.src_f, **self.kwargs)
  AssertionError: Exception not raised
  </code></pre>
  
  <p>If I assert on <code>mock_rmtree</code> it will pass. How can I assert on the caller (in this case, the function <code>move</code>)?</p>
  
  <hr>
  
  <p>As <strong>aquavitae</strong> pointed out, the primary reasons was copy-paste error, and also I was asserting a tuple in the beginning. Always asseert with the right return type...</p>