def test_last_callid_with_event_for_agent(self): t = datetime(2012, 1, 1) event = 'FULL' agent = 'Agent/1234' queue = 'queue' self._insert_entry_queue( event, self._build_timestamp(t), 'one', queue, agent, ) self._insert_entry_queue( event, self._build_timestamp(t + timedelta(minutes=3)), 'two', queue, agent, ) res = queue_log_dao.get_last_callid_with_event_for_agent( event, agent, ) self.assertEqual(res, 'two')
def get_last_callid(event, agent_number): with session_scope(): callid = queue_log_dao.get_last_callid_with_event_for_agent( event, _build_agent_db_tag_from_number(agent_number) ) return callid
def get_last_callid(event, agent_number): callid = queue_log_dao.get_last_callid_with_event_for_agent( event, _build_agent_db_tag_from_number(agent_number) ) return callid