def test_people_export_personal_contacts_csv_result(self): result = 'firstname,lastname\r\nBob,the Buidler\r\n,Alice,Wonderland\r\n' expected = { 'class': 'people_export_personal_contacts_csv_result', 'csv_contacts': result } result = CTIMessageFormatter.people_export_personal_contacts_csv_result( result) assert_that(result, equal_to(expected))
def _send_export_personal_contacts_csv_result(self, user_id, result): xuserid = 'xivo/{user_id}'.format(user_id=user_id) message = CTIMessageFormatter.people_export_personal_contacts_csv_result(result) self._cti_server.send_to_cti_client(xuserid, message)