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)
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))