Esempio n. 1
0
 def make_app(self, extra_settings={}):
     settings = {"event_listeners": "cliquet.listeners.redis"}
     settings.update(**extra_settings)
     config = testing.setUp(settings=settings)
     config.commit()
     initialization.setup_listeners(config)
     return config
Esempio n. 2
0
 def make_app(self, extra_settings={}):
     settings = {
         'event_listeners': 'cliquet.listeners.redis',
     }
     settings.update(**extra_settings)
     config = testing.setUp(settings=settings)
     initialization.setup_listeners(config)
     return config
Esempio n. 3
0
 def make_app(self, extra_settings={}):
     settings = {
         'event_listeners': 'cliquet.listeners.redis',
     }
     settings.update(**extra_settings)
     config = testing.setUp(settings=settings)
     config.commit()
     initialization.setup_listeners(config)
     return config
Esempio n. 4
0
    def redis_listening(self):
        config = self.config
        listener = "cliquet.listeners.redis"

        # setting up the redis listener
        with mock.patch.dict(
            config.registry.settings, [("event_listeners", listener), ("event_listeners.redis.pool_size", "1")]
        ):
            initialization.setup_listeners(config)
            config.commit()
            yield
Esempio n. 5
0
    def redis_listening(self):
        config = self.config
        listener = 'cliquet.listeners.redis'

        # setting up the redis listener
        with mock.patch.dict(config.registry.settings,
                             [('event_listeners', listener),
                              ('event_listeners.redis.pool_size', '1')]):
            initialization.setup_listeners(config)
            config.commit()
            yield