def METHOD_NAME(randomstring):
    queue_info = {**q_info}
    rp = ResultPublisher(queue_info=queue_info)
    rp._mq_chan = mock.Mock()
    rp.is_alive = mock.Mock()
    msg = b"abc"
    f = rp.publish(msg)
    assert (
        not rp._awaiting_confirmation
    ), "publish() *enqueues*, but doesn't upstream publish yet"
    f_enqueued, msg_enqueued = rp._outstanding.get()
    assert msg == msg_enqueued
    assert not f.done(), "Ensure a future"
    res = randomstring()
    f_enqueued.set_result(res)
    assert f.result() == res