mirror of
https://github.com/jdupouy/radicale3-auth-ldap.git
synced 2024-10-27 19:14:00 +00:00
Fix #1: Test for LDAPInvalidCredentialsResult
This commit is contained in:
parent
3867236b2c
commit
ee04ae08ae
21
test/basic_tests.py
Normal file
21
test/basic_tests.py
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
import radicale_auth_ldap
|
||||||
|
|
||||||
|
|
||||||
|
class References(unittest.TestCase):
|
||||||
|
def test_invalid_credentials_exception_exists(self):
|
||||||
|
successful_test = False
|
||||||
|
|
||||||
|
try:
|
||||||
|
import ldap3.core.exceptions
|
||||||
|
except ImportError:
|
||||||
|
self.fail('ldap3 module was not found at all!')
|
||||||
|
try:
|
||||||
|
raise ldap3.core.exceptions.LDAPInvalidCredentialsResult()
|
||||||
|
except ldap3.core.exceptions.LDAPInvalidCredentialsResult:
|
||||||
|
successful_test = True
|
||||||
|
|
||||||
|
self.assertTrue(successful_test)
|
Loading…
Reference in New Issue
Block a user