Use return_value instead of side_effect

Makes the test code a little shorter