[Zope-CVS] SVN: ldapadapter/trunk/README.txt Improved doctest with
search.
Florent Guillaume
fg at nuxeo.com
Sat Oct 9 09:48:18 EDT 2004
Log message for revision 27830:
Improved doctest with search.
Changed:
U ldapadapter/trunk/README.txt
-=-
Modified: ldapadapter/trunk/README.txt
===================================================================
--- ldapadapter/trunk/README.txt 2004-10-09 13:47:53 UTC (rev 27829)
+++ ldapadapter/trunk/README.txt 2004-10-09 13:48:18 UTC (rev 27830)
@@ -15,20 +15,23 @@
>>> from ldapadapter.interfaces import ILDAPAdapter
>>> from ldapadapter.interfaces import ILDAPConnection
>>> from ldapadapter import LDAPAdapter
-
+
>>> host = u'localhost'
>>> port = 389
>>> useSSL = False
>>> da = LDAPAdapter(host, port)
- >>> da.host
- u'localhost'
-
- >>> da.port
- 389
-
- >>> da.useSSL
- False
+ >>> (da.host, da.port, da.useSSL)
+ (u'localhost', 389, False)
>>> dn = 'Manager'
>>> pw = ''
- >>> con = da.connect(dn, pw)
+ >>> conn = da.connect(dn, pw)
+
+ >>> conn.add('cn=yo,o=test,dc=org', {'cn': ['yo']})
+
+The fake implementation of ldap used for the tests returns a simpler
+result than a real server would:
+
+ >>> conn.search('o=test,dc=org', 'sub')
+ [(u'cn=yo', {'cn': [u'yo']})]
+
More information about the Zope-CVS
mailing list