def _mock_adapter(self, request):
        mock_obj = flexmock()
        flexmock(request).should_receive('adapter').and_return(mock_obj)

        return mock_obj
Creates a mock object and replace the result of the adapter method with is
dataset/ETHPy150Open smore-inc/tinys3/tinys3/tests/test_upload_request.py/TestUploadRequest._mock_adapter