diff options
author | Marco Huenseler <marcoh.huenseler+git@gmail.com> | 2017-12-03 20:33:05 +0100 |
---|---|---|
committer | Marco Huenseler <marcoh.huenseler+git@gmail.com> | 2017-12-03 20:33:05 +0100 |
commit | ee04ae08ae2dd8c9804faf192dcd01431c7dd59d (patch) | |
tree | d1d5ab26d5df0d6f9ce32e4233c6cfcaa1fcaa1c | |
parent | update tests to unittest library (diff) | |
download | radicale_auth_ldap-ee04ae08ae2dd8c9804faf192dcd01431c7dd59d.tar.gz radicale_auth_ldap-ee04ae08ae2dd8c9804faf192dcd01431c7dd59d.tar.bz2 radicale_auth_ldap-ee04ae08ae2dd8c9804faf192dcd01431c7dd59d.zip |
Fix #1: Test for LDAPInvalidCredentialsResult
-rw-r--r-- | test/basic_tests.py | 21 |
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 |