Ejemplo n.º 1
0
def connect_signals():
    review_request_closed.connect(review_request_closed_cb, sender=ReviewRequest)
    review_request_published.connect(review_request_published_cb, sender=ReviewRequest)
    review_request_reopened.connect(review_request_reopened_cb, sender=ReviewRequest)

    review_published.connect(review_published_cb, sender=Review)
    reply_published.connect(reply_published_cb, sender=Review)
Ejemplo n.º 2
0
def connect_signals():
    """Connect e-mail callbacks to signals."""
    review_request_published.connect(review_request_published_cb, sender=ReviewRequest)
    review_published.connect(review_published_cb, sender=Review)
    reply_published.connect(reply_published_cb, sender=Review)
    review_request_closed.connect(review_request_closed_cb, sender=ReviewRequest)
    user_registered.connect(user_registered_cb)
Ejemplo n.º 3
0
def connect_signals():
    review_request_published.connect(review_request_published_cb,
                                     sender=ReviewRequest)
    review_published.connect(review_published_cb, sender=Review)
    reply_published.connect(reply_published_cb, sender=Review)
    review_request_closed.connect(review_request_closed_cb,
                                  sender=ReviewRequest)
    user_registered.connect(user_registered_cb)
Ejemplo n.º 4
0
def connect_signals():
    review_request_published.connect(review_request_published_cb,
                                     sender=ReviewRequest)
    review_published.connect(review_published_cb, sender=Review)
    reply_published.connect(reply_published_cb, sender=Review)
    review_request_closed.connect(review_request_closed_cb,
                                  sender=ReviewRequest)
    user_registered.connect(user_registered_cb)
Ejemplo n.º 5
0
    def __init__(self, extension):
        """Initialize and connect all the signals"""
        self.extension = extension

        # Connect the handlers.
        review_request_published.connect(self._review_request_published)
        review_request_closed.connect(self._review_request_closed)
        review_published.connect(self._review_published)
Ejemplo n.º 6
0
def connect_signals():
    """Connect e-mail callbacks to signals."""
    review_request_published.connect(review_request_published_cb,
                                     sender=ReviewRequest)
    review_published.connect(review_published_cb, sender=Review)
    reply_published.connect(reply_published_cb, sender=Review)
    review_request_closed.connect(review_request_closed_cb,
                                  sender=ReviewRequest)
    user_registered.connect(user_registered_cb)
Ejemplo n.º 7
0
def connect_signals():
    review_request_closed.connect(review_request_closed_cb,
                                  sender=ReviewRequest)
    review_request_published.connect(review_request_published_cb,
                                     sender=ReviewRequest)
    review_request_reopened.connect(review_request_reopened_cb,
                                    sender=ReviewRequest)

    review_published.connect(review_published_cb, sender=Review)
    reply_published.connect(reply_published_cb, sender=Review)
 def register_signals(self):
         review_request_published.connect(self.review_request_published_cb,
                                          sender=ReviewRequest, dispatch_uid="rbxmppnotification")
         review_published.connect(self.review_published_cb, sender=Review, dispatch_uid="rbxmppnotification")
         reply_published.connect(self.reply_published_cb, sender=Review, dispatch_uid="rbxmppnotification")
         review_request_closed.connect(self.review_request_closed_cb,
                                       sender=ReviewRequest, dispatch_uid="rbxmppnotification")
         review_request_reopened.connect(self.review_request_reopened_cb,
                                       sender=ReviewRequest, dispatch_uid="rbxmppnotification")
         user_registered.connect(self.user_registered_cb, dispatch_uid="rbxmppnotification")
Ejemplo n.º 9
0
def connect_signals():
    """Connect e-mail callbacks to signals."""
    review_request_published.connect(review_request_published_cb,
                                     sender=ReviewRequest)
    review_published.connect(review_published_cb, sender=Review)
    reply_published.connect(reply_published_cb, sender=Review)
    review_request_closed.connect(review_request_closed_cb,
                                  sender=ReviewRequest)
    user_registered.connect(user_registered_cb)
    post_save.connect(webapi_token_saved_cb, sender=WebAPIToken)
    post_delete.connect(webapi_token_deleted_cb, sender=WebAPIToken)
Ejemplo n.º 10
0
def connect_signals():
    """Connect e-mail callbacks to signals."""
    review_request_published.connect(review_request_published_cb,
                                     sender=ReviewRequest)
    review_published.connect(review_published_cb, sender=Review)
    reply_published.connect(reply_published_cb, sender=Review)
    review_request_closed.connect(review_request_closed_cb,
                                  sender=ReviewRequest)
    user_registered.connect(user_registered_cb)
    post_save.connect(webapi_token_saved_cb, sender=WebAPIToken)
    post_delete.connect(webapi_token_deleted_cb, sender=WebAPIToken)
Ejemplo n.º 11
0
    def test_review_request_closed(self):
        """Testing review_request_closing signal has deprecated type argument
        """
        def review_request_closed_cb(close_type, **kwargs):
            pass

        self.spy_on(review_request_closed_cb)
        review_request_closed.connect(review_request_closed_cb,
                                      sender=ReviewRequest)

        review_request = self.create_review_request(publish=True)

        try:
            review_request.close(ReviewRequest.SUBMITTED)
        finally:
            review_request_closed.disconnect(review_request_closed_cb)

        self.assertTrue(review_request_closed_cb.spy.called)
Ejemplo n.º 12
0
 def register_signals(self):
     review_request_published.connect(self.review_request_published_cb,
                                      sender=ReviewRequest,
                                      dispatch_uid="rbxmppnotification")
     review_published.connect(self.review_published_cb,
                              sender=Review,
                              dispatch_uid="rbxmppnotification")
     reply_published.connect(self.reply_published_cb,
                             sender=Review,
                             dispatch_uid="rbxmppnotification")
     review_request_closed.connect(self.review_request_closed_cb,
                                   sender=ReviewRequest,
                                   dispatch_uid="rbxmppnotification")
     review_request_reopened.connect(self.review_request_reopened_cb,
                                     sender=ReviewRequest,
                                     dispatch_uid="rbxmppnotification")
     user_registered.connect(self.user_registered_cb,
                             dispatch_uid="rbxmppnotification")