phi/test/conftest.py
2017-12-23 17:18:12 +01:00

18 lines
465 B
Python

import pytest
import phi.ldap.client
@pytest.fixture
def ldap_client():
client = phi.ldap.client.Client(
host='localhost', port=389,
encryption='TLSv1.2', ciphers='HIGH',
validate=False,
username='uid=phi,ou=Services,dc=unit,dc=macaomilano,dc=org',
password='phi',
base_dn='dc=unit,dc=macaomilano,dc=org',
attribute_id='uid', attribute_mail='mail')
client.open()
yield client
client.close()