| 1 |
""" |
| 2 |
""" |
| 3 |
|
| 4 |
# Created on 2014.05.10 |
| 5 |
# |
| 6 |
# Author: Giovanni Cannata |
| 7 |
# |
| 8 |
# Copyright 2014 - 2020 Giovanni Cannata |
| 9 |
# |
| 10 |
# This file is part of ldap3. |
| 11 |
# |
| 12 |
# ldap3 is free software: you can redistribute it and/or modify |
| 13 |
# it under the terms of the GNU Lesser General Public License as published |
| 14 |
# by the Free Software Foundation, either version 3 of the License, or |
| 15 |
# (at your option) any later version. |
| 16 |
# |
| 17 |
# ldap3 is distributed in the hope that it will be useful, |
| 18 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 |
# GNU Lesser General Public License for more details. |
| 21 |
# |
| 22 |
# You should have received a copy of the GNU Lesser General Public License |
| 23 |
# along with ldap3 in the COPYING and COPYING.LESSER files. |
| 24 |
# If not, see <http://www.gnu.org/licenses/>. |
| 25 |
|
| 26 |
import unittest |
| 27 |
|
| 28 |
from ldap3.core.exceptions import LDAPException, LDAPOperationsErrorResult, LDAPOperationResult |
| 29 |
|
| 30 |
|
| 31 |
class Test(unittest.TestCase): |
| 32 |
def test_main_class_exception(self): |
| 33 |
e = LDAPException() |
| 34 |
self.assertTrue(isinstance(e, LDAPException)) |
| 35 |
|
| 36 |
def test_subclassing_exception(self): |
| 37 |
e = LDAPOperationResult(1) |
| 38 |
self.assertTrue(isinstance(e, LDAPOperationsErrorResult)) |