phi/test/conftest.py

34 lines
945 B
Python
Raw Normal View History

2017-12-23 17:10:15 +01:00
import pytest
import phi.ldap.client
# import phi.api.app
2017-12-23 17:10:15 +01:00
@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',
2020-09-30 16:38:31 +02:00
base_dn='dc=unit,dc=macaomilano,dc=org')
2017-12-23 17:10:15 +01:00
client.open()
yield client
client.close()
2017-12-27 11:02:38 +01:00
# @pytest.fixture
# def api_app():
# return phi.api.app.api_app({
# 'ldap': {
# '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'}})