Exemplo n.º 1
0
 def __init__(self):
     self.ami = client.AMIClient()
     self.ami.register_event('AgentCalled', self._handle_agent_called)
     self.ami.register_event('AgentComplete', self._handle_agent_complete)
     self.ami.register_event('AgentConnect', self._handle_agent_connect)
     self.ami.register_event('QueueMemberAdded',
                             self._handle_queue_member_added)
     self.ami.register_event('QueueMemberPaused',
                             self._handle_queue_member_paused)
     self.ami.register_event('QueueMemberRemoved',
                             self._handle_queue_member_removed)
     self.ami.register_event('UserEvent', self._handle_user_event)
     self.redis = api.get_instance()
     self.callers = dict()
Exemplo n.º 2
0
 def __init__(self):
     self.ami = client.AMIClient()
     self.ami.register_event('AgentCalled', self._handle_agent_called)
     self.ami.register_event('AgentComplete', self._handle_agent_complete)
     self.ami.register_event('AgentConnect', self._handle_agent_connect)
     self.ami.register_event(
         'QueueMemberAdded', self._handle_queue_member_added)
     self.ami.register_event(
         'QueueMemberPaused', self._handle_queue_member_paused)
     self.ami.register_event(
         'QueueMemberRemoved', self._handle_queue_member_removed)
     self.ami.register_event(
         'UserEvent', self._handle_user_event)
     self.redis = api.get_instance()
     self.callers = dict()
Exemplo n.º 3
0
 def before(self, state):
     state.request.cache_api = cache_api.get_instance()
Exemplo n.º 4
0
 def setUp(self):
     super(TestCase, self).setUp()
     self.cache_api = cache_api.get_instance()
     self.server_api = server_api.API()
Exemplo n.º 5
0
 def __init__(self):
     self.cache_api = api.get_instance()
Exemplo n.º 6
0
 def setUp(self):
     super(TestCase, self).setUp()
     self.cache_api = api.get_instance()
     res = self._create_test_queue()
     self.queue_id = res['uuid']
Exemplo n.º 7
0
 def setUp(self):
     super(TestCase, self).setUp()
     self.cache_api = api.get_instance()
     res = self._create_test_queue()
     self.queue_id = res['uuid']
Exemplo n.º 8
0
 def __init__(self):
     self.cache_api = api.get_instance()
Exemplo n.º 9
0
 def setUp(self):
     super(TestCase, self).setUp()
     self.cache_api = api.get_instance()
Exemplo n.º 10
0
 def setUp(self):
     super(TestCase, self).setUp()
     self.cache_api = cache_api.get_instance()
     self.server_api = server_api.API()
Exemplo n.º 11
0
 def before(self, state):
     state.request.cache_api = cache_api.get_instance()