예제 #1
0
    def test_edit(self, voicemail_dao_edit, voicemail_notifier_edited, validate_edit):
        name = 'voicemail'
        number = '25880'
        context = 'default'

        voicemail = Voicemail(name=name,
                              number=number,
                              context=context)

        voicemail_services.edit(voicemail)

        validate_edit.assert_called_once_with(voicemail)
        voicemail_dao_edit.assert_called_once_with(voicemail)
        voicemail_notifier_edited.assert_called_once_with(voicemail)
예제 #2
0
def edit(voicemailid):
    data = document.parse(request)
    voicemail = voicemail_services.get(voicemailid)
    formatter.update_dict_model(data, voicemail)
    voicemail_services.edit(voicemail)
    return make_response('', 204)