예제 #1
0
    def test_validate_edit_not_linked(self, validate_model,
                                      validate_existing_number_context,
                                      is_voicemail_linked):
        voicemail = Mock(Voicemail, id=1, number='1000', context='default')

        is_voicemail_linked.return_value = False

        validator.validate_edit(voicemail)

        validate_model.assert_called_once_with(voicemail)
        validate_existing_number_context.assert_called_once_with(voicemail)
        is_voicemail_linked.assert_called_once_with(voicemail)
예제 #2
0
    def test_validate_edit_not_linked(self,
                                      validate_model,
                                      validate_existing_number_context,
                                      is_voicemail_linked):
        voicemail = Mock(Voicemail, id=1, number='1000', context='default')

        is_voicemail_linked.return_value = False

        validator.validate_edit(voicemail)

        validate_model.assert_called_once_with(voicemail)
        validate_existing_number_context.assert_called_once_with(voicemail)
        is_voicemail_linked.assert_called_once_with(voicemail)
예제 #3
0
def edit(voicemail):
    validator.validate_edit(voicemail)
    voicemail_dao.edit(voicemail)
    notifier.edited(voicemail)
예제 #4
0
파일: services.py 프로젝트: jaunis/xivo-dao
def edit(voicemail):
    validator.validate_edit(voicemail)
    voicemail_dao.edit(voicemail)
    notifier.edited(voicemail)