I am Cc this to testing-in-python mailing list. Hope this makes sense.<br><br>Suppose I have a function called "render_reverse" which takes two arguments: function name, and args list, and it returns "reverse(f, *args)"<br><br>If I called render_reverse('happy_birthday', {'args': [username]}), I would get this:&nbsp;&nbsp; /greeting/birthday/username/<br><br>I am going to patch the `reverse` function that's local to render_reverse, and inside the test, should I always provide a return value like this?<br><br><blockquote>with patch('myproject.myapps.mylibrary.reverse') as mock_reverse:<br>&nbsp;&nbsp;&nbsp;&nbsp; mock_f = MagicMock(name='f')<br>&nbsp;&nbsp;&nbsp;&nbsp; mock_kwargs = MagicMock(name='kwargs')<br>&nbsp;&nbsp;&nbsp;&nbsp; mock_reverse.return_value = ' /greeting/birthday/johnsmith/'<br>&nbsp;&nbsp;&nbsp;&nbsp; response = mock_reverse(mock_f, mock_kwargs)<br><br>self.assert......<br></blockquote><div><br>What is the best practice in general? How do I determine whether I want to provide a return value or not? In almost any cases, how do I know things go well? Sometimes I can't differentiate unittest from integration / system test (I want to see other codes ikn the same function execute and throw back the right result!!!!)<br><br>Thanks! <br></div>