def test_delete_queue_members(self): queue_member_ids = xrange(1, 4) expected = { 'class': 'getlist', 'listname': 'queuemembers', 'function': 'delconfig', 'tipbxid': 'xivo', 'list': [1, 2, 3], } result = CTIMessageFormatter.delete_queue_members(queue_member_ids) self.assertEqual(result, expected)
def test_delete_queue_members(self): queue_member_ids = xrange(1, 4) expected = { 'class': 'getlist', 'listname': 'queuemembers', 'function': 'delconfig', 'tipbxid': 'xivo', 'list': [1, 2, 3], } result = CTIMessageFormatter.delete_queue_members(queue_member_ids) self.assertEqual(result, expected)
def on_queue_member_removed(self, queue_member): queue_member_ids = [queue_member.id] message = CTIMessageFormatter.delete_queue_members(queue_member_ids) self.send_cti_event(message)