def test_getlist_update_status_user(self): result = CTIMessageFormatter.getlist_update_status_users( s.user_id, s.status) assert_that( result, equal_to({ 'class': 'getlist', 'function': 'updatestatus', 'listname': 'users', 'tipbxid': 'xivo', 'tid': s.user_id, 'status': { 'availstate': s.status } }))
def _on_response_get_presence(self, user_id, client_connection, response): status = response['presence'] message = CTIMessageFormatter.getlist_update_status_users( user_id, status) client_connection.send_message(message)