示例#1
0
    def test_validate_delete_when_not_linked(self, is_voicemail_linked):
        voicemail = Mock(Voicemail)

        is_voicemail_linked.return_value = False

        validator.validate_delete(voicemail)

        is_voicemail_linked.assert_called_once_with(voicemail)
示例#2
0
def delete(voicemail):
    validator.validate_delete(voicemail)
    voicemail_dao.delete(voicemail)
    notifier.deleted(voicemail)
    try:
        sysconfd_connector.delete_voicemail_storage(voicemail.number, voicemail.context)
    except Exception as e:
        raise SysconfdError(str(e))
示例#3
0
    def test_validate_delete_when_not_linked(self, is_voicemail_linked):
        voicemail = Mock(Voicemail)

        is_voicemail_linked.return_value = False

        validator.validate_delete(voicemail)

        is_voicemail_linked.assert_called_once_with(voicemail)
示例#4
0
def delete(voicemail):
    validator.validate_delete(voicemail)
    voicemail_dao.delete(voicemail)
    notifier.deleted(voicemail)
    try:
        sysconfd_connector.delete_voicemail_storage(voicemail.number,
                                                    voicemail.context)
    except Exception as e:
        raise SysconfdError(str(e))