def test_edit(self, user_validate_edit, user_dao_edit, user_notifier_edited, line_services_update_callerid, user_services_update_caller_id, update_voicemail_fullname): user = User(id=1, firstname='user', lastname='toto', voicemail_id=3) user_services.edit(user) user_validate_edit.assert_called_once_with(user) user_services.update_caller_id.assert_called_once_with(user) user_dao_edit.assert_called_once_with(user) user_notifier_edited.assert_called_once_with(user) line_services_update_callerid.assert_called_once_with(user) update_voicemail_fullname.assert_called_once_with(user)
def edit(userid): data = document.parse(request) user = user_services.get(userid) formatter.update_dict_model(data, user) user_services.edit(user) return make_response('', 204)
def associate_voicemail(user_id, voicemail_id): user = user_services.get(user_id) voicemail = voicemail_services.get(voicemail_id) user.voicemail_id = voicemail.id user_services.edit(user)