From 3867236b2cb020756b5c8c19a8542cca658a2f49 Mon Sep 17 00:00:00 2001 From: Marco Huenseler Date: Sun, 3 Dec 2017 20:24:43 +0100 Subject: update tests to unittest library --- test/integration_tests.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 test/integration_tests.py (limited to 'test/integration_tests.py') diff --git a/test/integration_tests.py b/test/integration_tests.py new file mode 100644 index 0000000..f6f8820 --- /dev/null +++ b/test/integration_tests.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- + +import logging +import unittest + +import radicale_auth_ldap +from test.configuration import TEST_CONFIGURATION, VALID_USER, VALID_PASS +from test.util import ConfigMock + + +class Authentication(unittest.TestCase): + configuration = None + logger = None + + @classmethod + def setUpClass(cls): + cls.configuration = ConfigMock(TEST_CONFIGURATION) + cls.logger = logging.getLogger(__name__) + + def test_authentication_works(self): + auth = radicale_auth_ldap.Auth(self.__class__.configuration, self.__class__.logger) + self.assertTrue(auth.is_authenticated(VALID_USER, VALID_PASS)) + + +if __name__ == '__main__': + unittest.main() -- cgit