def mock_req_channel_api(mocker):
    """
    Mocks the channel API object that is made available on a request via middleware
    """
    return mocker.patch("open_discussions.middleware.channel_api.Api", autospec=True)