From ee04ae08ae2dd8c9804faf192dcd01431c7dd59d Mon Sep 17 00:00:00 2001 From: Marco Huenseler Date: Sun, 3 Dec 2017 20:33:05 +0100 Subject: [PATCH] Fix #1: Test for LDAPInvalidCredentialsResult --- test/basic_tests.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/basic_tests.py 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