def setUp(self): DAOTestCase.setUp(self) func_key_type_row = self.add_func_key_type(name='speeddial') destination_type_row = self.add_func_key_destination_type(id=1, name='user') self.type_id = func_key_type_row.id self.destination_type_id = destination_type_row.id
def setUp(self): DAOTestCase.setUp(self) self.callid = '1404377805.6457' self.enterqueue_event = QueueLog( time='2014-07-03 10:57:11.559080', callid=self.callid, queuename='swk_allemagne', agent='NONE', event='ENTERQUEUE', data2='00049242184770', data3='1', ) self.connect_event = QueueLog( time='2014-07-03 10:57:19.461280', callid=self.callid, queuename='swk_allemagne', agent='Agent/448', event='CONNECT', data1='8', data2='1404377831.6460', data3='4', ) self.complete_agent_event = QueueLog( time='2014-07-03 11:06:10.374302', callid=self.callid, queuename='swk_allemagne', agent='Agent/448', event='COMPLETEAGENT', data1='8', data2='531', data3='1', )
def setUp(self): DAOTestCase.setUp(self) self.start = t(2012, 7, 1, tzinfo=pytz.UTC) self.end = t(2012, 7, 31, 23, 59, 59, 999999, tzinfo=pytz.UTC) self.qname1, self.qid1 = self._insert_queue('q1') self.qname2, self.qid2 = self._insert_queue('q2') self.aname1, self.aid1 = self._insert_agent('a1') self.aname2, self.aid2 = self._insert_agent('a2')
def setUp(self): DAOTestCase.setUp(self) self._user_id = 19 self._user_id_no_dest = 21 self._destination_unc = '123' self._destination_rna = '234' self._insert_funckeys()
def setUp(self): DAOTestCase.setUp(self) self.db_converter_patcher = patch( 'xivo_dao.data_handler.call_log.model.db_converter') self.db_converter = self.db_converter_patcher.start() self.call_log_rows = [] self.db_converter.to_source.side_effect = lambda: self.call_log_rows.pop( 0)
def setUp(self): DAOTestCase.setUp(self) self.config = SearchConfig(table=UserFeatures, columns={'lastname': UserFeatures.lastname, 'firstname': UserFeatures.firstname, 'simultcalls': UserFeatures.simultcalls}, default_sort='lastname') self.search = SearchSystem(self.config)
def setUp(self): DAOTestCase.setUp(self) self.start = t(2012, 07, 01) self.end = t(2012, 07, 31, 23, 59, 59, 999999) self.qname1, self.qid1 = self._insert_queue('q1') self.qname2, self.qid2 = self._insert_queue('q2') self.aname1, self.aid1 = self._insert_agent('a1') self.aname2, self.aid2 = self._insert_agent('a2')
def setUp(self): DAOTestCase.setUp(self) if not self._fn_created: self._create_functions() self.start = t(2012, 07, 01) self.end = t(2012, 07, 31, 23, 59, 59, 999999) self.qname1, self.qid1 = self._insert_queue('q1') self.qname2, self.qid2 = self._insert_queue('q2') self.aname1, self.aid1 = self._insert_agent('a1') self.aname2, self.aid2 = self._insert_agent('a2')
def setUp(self): DAOTestCase.setUp(self) self.config = SearchConfig(table=UserFeatures, columns={ 'lastname': UserFeatures.lastname, 'firstname': UserFeatures.firstname, 'simultcalls': UserFeatures.simultcalls }, default_sort='lastname') self.search = SearchSystem(self.config)
def setUp(self): DAOTestCase.setUp(self) self._create_functions() self.callid = '1404377805.6457' event = QueueLog( time=t(2020, 1, 1, 0, 0, 0, tzinfo=pytz.UTC), callid=self.callid, queuename='found_queue', event='FULL', ) self.add_me(event) event = QueueLog( time=t(2020, 2, 1, tzinfo=pytz.UTC), callid=self.callid, queuename='ignored_queue', event='CLOSED', ) self.add_me(event)
def setUp(self): DAOTestCase.setUp(self) self._create_functions() self.callid_found = '1404377805.6457' event = QueueLog( time=t(2020, 1, 1, 0, 0, 0, tzinfo=pytz.UTC), callid=self.callid_found, queuename='found_queue', event='LEAVEEMPTY', ) self.add_me(event) event = QueueLog( time=t(2020, 1, 1, 0, 0, 0, tzinfo=pytz.UTC), callid=self.callid_found, queuename='found_queue', event='ENTERQUEUE', ) self.add_me(event) queue = StatQueue(name='found_queue', tenant_uuid=self.default_tenant.uuid) self.add_me(queue) self.callid_ignored = '1000000000.0000' event = QueueLog( time=t(2020, 2, 1, tzinfo=pytz.UTC), callid=self.callid_ignored, queuename='ignored_queue', event='LEAVEEMPTY', ) self.add_me(event) event = QueueLog( time=t(2020, 2, 1, tzinfo=pytz.UTC), callid=self.callid_ignored, queuename='ignored_queue', event='ENTERQUEUE', ) self.add_me(event) queue = StatQueue(name='ignored_queue', tenant_uuid=self.default_tenant.uuid) self.add_me(queue)
def setUp(self): DAOTestCase.setUp(self) self.entity = self.add_entity()
def setUp(self): DAOTestCase.setUp(self) self.queue_name = 'q1'
def setUp(self): DAOTestCase.setUp(self) self.create_types_and_destinations()
def setUp(self): DAOTestCase.setUp(self) self.existing_extension = self.add_extension(exten='1635', context='my_context', type='user', typeval='0')
def setUp(self): DAOTestCase.setUp(self) self.db_converter_patcher = patch('xivo_dao.data_handler.call_log.model.db_converter') self.db_converter = self.db_converter_patcher.start() self.call_log_rows = [] self.db_converter.to_source.side_effect = lambda: self.call_log_rows.pop(0)