[Zope-CVS] SVN: ldapadapter/trunk/README.txt More tests.

Florent Guillaume fg at nuxeo.com
Wed Oct 13 08:48:46 EDT 2004


Log message for revision 28074:
  More tests.
  

Changed:
  U   ldapadapter/trunk/README.txt

-=-
Modified: ldapadapter/trunk/README.txt
===================================================================
--- ldapadapter/trunk/README.txt	2004-10-13 12:48:22 UTC (rev 28073)
+++ ldapadapter/trunk/README.txt	2004-10-13 12:48:45 UTC (rev 28074)
@@ -48,6 +48,13 @@
 Once you have an LDAP adapter, you can get an LDAP connection by calling
 connect() on the database adapter.
 
+If the server doesn't answer, you'll get an exception when you connect:
+
+  >>> LDAPAdapter('down', 389).connect('', '')
+  Traceback (most recent call last):
+  ...
+  ServerDown
+
 You can either use the default bind DN and password if these have been
 specified in the adapter:
 
@@ -57,6 +64,13 @@
 
   >>> conn = da.connect('cn=Manager,dc=org', 'supersecret')
 
+If you provide an incorrect password, an exception is returned:
+
+  >>> conn = da.connect('cn=Bob', 'pretend')
+  Traceback (most recent call last):
+  ...
+  InvalidCredentials
+
 You can bind anonymously by using an empty DN and password:
 
   >>> conn = da.connect('', '')
@@ -67,6 +81,7 @@
   >>> verifyObject(ILDAPConnection, conn)
   True
 
+
 Commands
 ========
 
@@ -116,6 +131,13 @@
   [(u'cn=bar,dc=test', {'cn': [u'bar']}),
    (u'cn=baz,dc=test', {'cn': [u'baz']})]
 
+Searching on an base that doesn't exist returns an exception:
+
+  >>> conn.search('dc=bzzt')
+  Traceback (most recent call last):
+  ...
+  NoSuchObject: dc=bzzt
+
 Modify
 ------
 
@@ -142,4 +164,6 @@
 
   >>> conn.delete('cn=foo,dc=test')
   >>> conn.search('cn=foo,dc=test')
-  []
+  Traceback (most recent call last):
+  ...
+  NoSuchObject: cn=foo,dc=test



More information about the Zope-CVS mailing list