diff --git a/tests/storage/test_ldap.py b/tests/storage/test_ldap.py index 7413f49cf..5088a6bf6 100644 --- a/tests/storage/test_ldap.py +++ b/tests/storage/test_ldap.py @@ -14,12 +14,12 @@ class TestLDAPStorage(StorageTests): @pytest.fixture def get_storage_args(self): - uri = 'ldap://localhost' + url = 'ldap://localhost' server = ldap3.Server('fake') conn = ldap3.Connection(server, client_strategy=ldap3.MOCK_SYNC) conn.strategy.add_entry('cn=user0,ou=test,o=lab', {'userPassword': 'test0000', 'sn': 'user0_sn', 'revision': 0}) def inner(collection='test'): - return {'uri': uri, 'conn': conn} + return {'url': url, 'conn': conn} return inner diff --git a/vdirsyncer/storage/ldap.py b/vdirsyncer/storage/ldap.py index bd8ceeef7..17635b3ae 100644 --- a/vdirsyncer/storage/ldap.py +++ b/vdirsyncer/storage/ldap.py @@ -11,7 +11,7 @@ class LDAPStorage(Storage): ''' - :param uri: LDAP URI + :param url: LDAP URL :param search_base: search base :param bind: bind dn :param password: bind password @@ -22,7 +22,7 @@ class LDAPStorage(Storage): fileext = '.vcf' item_mimetype = 'text/vcard' - def __init__(self, uri='ldap://localhost', search_base=None, bind=None, password=None, + def __init__(self, url='ldap://localhost', search_base=None, bind=None, password=None, filter='(&(objectCategory=person)(objectClass=user)' '(sn=*)(givenName=*))', conn=None, @@ -32,7 +32,7 @@ def __init__(self, uri='ldap://localhost', search_base=None, bind=None, password self.filter = filter self.conn = conn if self.conn is None: - server = ldap3.Server(uri, get_info=ldap3.DSA) + server = ldap3.Server(url, get_info=ldap3.DSA) if bind: self.conn = ldap3.Connection(server, user=bind, password=password)