Update to support Radicale 3.x
This commit is contained in:
@@ -8,7 +8,8 @@ TEST_CONFIGURATION = {
|
||||
'ldap_filter': '(objectClass=person)',
|
||||
'ldap_binddn': 'cn=xxx,dc=xxx,dc=xx',
|
||||
'ldap_password': '',
|
||||
'ldap_scope': 'LEVEL'
|
||||
'ldap_scope': 'LEVEL',
|
||||
'ldap_support_extended': True
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,16 +10,14 @@ 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))
|
||||
auth = radicale_auth_ldap.Auth(self.__class__.configuration)
|
||||
self.assertTrue(auth.login(VALID_USER, VALID_PASS))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
@@ -11,3 +11,6 @@ class ConfigMock:
|
||||
|
||||
def get(self, a, b):
|
||||
return self.configuration[a][b]
|
||||
|
||||
def copy(self, c):
|
||||
return self
|
||||
|
||||
Reference in New Issue
Block a user