def test_update_queue_member_config(self): queue_member = Mock(QueueMember, id=12) queue_member.to_cti_config.return_value = sentinel.config expected = { 'class': 'getlist', 'listname': 'queuemembers', 'function': 'updateconfig', 'tipbxid': 'xivo', 'tid': 12, 'config': sentinel.config, } result = CTIMessageFormatter.update_queue_member_config(queue_member) self.assertEqual(result, expected)
def test_update_queue_member_config(self): queue_member = Mock(QueueMember, id=12) queue_member.to_cti_config.return_value = s.config expected = { 'class': 'getlist', 'listname': 'queuemembers', 'function': 'updateconfig', 'tipbxid': 'xivo', 'tid': 12, 'config': s.config, } result = CTIMessageFormatter.update_queue_member_config(queue_member) self.assertEqual(result, expected)
def on_queue_member_updated(self, queue_member): message = CTIMessageFormatter.update_queue_member_config(queue_member) self.send_cti_event(message)