phi/test/test_ldap.py

13 lines
373 B
Python
Raw Normal View History

2017-12-23 17:10:15 +01:00
from phi.ldap.user import get_user_by_uid
def test_connection(ldap_client):
assert ldap_client.connection.closed is False
assert ldap_client.connection.bound is True
def test_get_user_by_id(ldap_client):
entry = get_user_by_uid(ldap_client, 'conte_mascetti')
assert entry['uid'] == 'conte_mascetti'
assert entry['mail'] == 'rmascetti@autistici.org'