aboutsummaryrefslogtreecommitdiff
path: root/test/basic_tests.py
diff options
context:
space:
mode:
authorMarco Huenseler <marcoh.huenseler+git@gmail.com>2017-12-03 20:33:05 +0100
committerMarco Huenseler <marcoh.huenseler+git@gmail.com>2017-12-03 20:33:05 +0100
commitee04ae08ae2dd8c9804faf192dcd01431c7dd59d (patch)
treed1d5ab26d5df0d6f9ce32e4233c6cfcaa1fcaa1c /test/basic_tests.py
parentupdate tests to unittest library (diff)
downloadradicale_auth_ldap-ee04ae08ae2dd8c9804faf192dcd01431c7dd59d.tar.gz
radicale_auth_ldap-ee04ae08ae2dd8c9804faf192dcd01431c7dd59d.tar.bz2
radicale_auth_ldap-ee04ae08ae2dd8c9804faf192dcd01431c7dd59d.zip
Fix #1: Test for LDAPInvalidCredentialsResult
Diffstat (limited to 'test/basic_tests.py')
-rw-r--r--test/basic_tests.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/basic_tests.py b/test/basic_tests.py
new file mode 100644
index 0000000..3d20b68
--- /dev/null
+++ b/test/basic_tests.py
@@ -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) \ No newline at end of file
bgstack15