Пример #1
0
    def test_that_configured_broker_is_celery_with_redis(self):
        assert current_domain.has_broker('default')
        broker = current_domain.get_broker('default')

        assert isinstance(broker, CeleryBroker)
        assert broker.conn_info['URI'] == 'redis://127.0.0.1:6379/2'
        assert broker.celery_app is not None
Пример #2
0
 def broker(self):
     return current_domain.get_broker('default')
Пример #3
0
 def test_that_subscriber_is_registered_with_redis_broker(self):
     assert fully_qualified_name(
         NotifySSOSubscriber) in current_domain.subscribers
     assert isinstance(
         current_domain.get_broker(NotifySSOSubscriber.meta_.broker),
         RqBroker)
Пример #4
0
    def test_that_rq_connection_is_active(self):
        broker = current_domain.get_broker('default')
        conn = broker.get_connection()

        assert isinstance(conn, Redis)
        assert conn.ping() is True
Пример #5
0
    def test_that_configured_broker_is_redis(self):
        assert current_domain.has_broker('default')
        broker = current_domain.get_broker('default')

        assert isinstance(broker, RqBroker)
        assert broker.conn_info['URI'] == 'redis://127.0.0.1:6379/2'