def METHOD_NAME(retval, exp_message, message):
    self.logger.debug("Calling Authorize(): expecting pending")
    if not exp_message is None:
        self.assertEqual(message, exp_message)
    # Verify that Authorize returns 2 if there is a pending request
    ret = p2_session.Authorize(dict())
    self.assertEqual(2, ret, "Not-yet finished authorization request")
    # The loop_counter is incremented before we start waiting for
    # signal several lines below. The increment is there because we
    # must be waiting for the signal and also for Polkit
    # authorization. This call will interrupt the waiting for
    # signal.
    self.interrupt_waiting()
    return retval