def test_people_personal_contact_deleted(self): source = 'personal' source_entry_id = '123456789' expected = { 'class': 'people_personal_contact_deleted', 'source': source, 'source_entry_id': source_entry_id } result = CTIMessageFormatter.people_personal_contact_deleted( source, source_entry_id) assert_that(result, equal_to(expected))
def _send_personal_contact_deleted(self, user_id, source, source_entry_id, result): xuserid = 'xivo/{user_id}'.format(user_id=user_id) message = CTIMessageFormatter.people_personal_contact_deleted(source, source_entry_id) self._cti_server.send_to_cti_client(xuserid, message)