Skip to content

Commit

Permalink
Rename ldap URI into URL
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Fariello authored and paulfariello committed Oct 18, 2016
1 parent f812edd commit 51ec702
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions tests/storage/test_ldap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions vdirsyncer/storage/ldap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand All @@ -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)
Expand Down

0 comments on commit 51ec702

Please sign in to comment.