aboutsummaryrefslogtreecommitdiff
path: root/test/integration_tests.py
blob: f6f8820fad2dc861ea6a91912817109020201d20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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()
bgstack15