Adding auxiliary test module.
This commit is contained in:
parent
4e2cadaa92
commit
c4046a83ff
35
test/aux_async_model.py
Normal file
35
test/aux_async_model.py
Normal file
|
@ -0,0 +1,35 @@
|
|||
# coding: utf-8
|
||||
|
||||
import asyncio
|
||||
|
||||
from phi.ldap.async_model import (
|
||||
Hackers,
|
||||
Robots,
|
||||
Congregations,
|
||||
User,
|
||||
Service,
|
||||
build_heritage,
|
||||
iter_children,
|
||||
)
|
||||
from phi.ldap.async_client import AsyncClient
|
||||
|
||||
|
||||
async def dlv(h):
|
||||
return [el async for el in build_heritage(h, User)]
|
||||
|
||||
|
||||
cl = AsyncClient(
|
||||
"ldap://localhost",
|
||||
port=389,
|
||||
encryption=True,
|
||||
validate=True,
|
||||
ca_cert="openldap/cert.pem",
|
||||
username="root",
|
||||
password="root",
|
||||
base_dn="dc=unit,dc=macaomilano,dc=org",
|
||||
attribute_id="cn",
|
||||
)
|
||||
h = Hackers(cl)
|
||||
r = Robots(cl)
|
||||
g = Congregations(cl)
|
||||
# asyncio.run(dlv(h))
|
Loading…
Reference in New Issue
Block a user