ldap.py failures

Andrew Bartlett abartlet at samba.org
Wed Jan 7 06:32:56 GMT 2009


Since your change to pyldb from the old swig bindings, it seems that the
python ldap test has had a number of regressions.  I've fixed some (such
as ensuring the python bindings return an exception when the search
returns an error), but others I don't quite have the python foo for.

Can you please run 'make test TESTS=ldap.python' and fix the remaining

The current error I get is:

[1/1 in 54s] samba4.ldap.python (dc)
test: Basic tests
baseDN: DC=samba,DC=example,DC=com

Testing user add


Testing ldb.search for (&(cn=ldaptestuser)(objectClass=user))
error: Basic tests [
Traceback (most recent call last):
  File "./lib/ldb/tests/python/ldap.py", line 653, in test_all
    self.assertEquals(str(res[0]["objectClass"]), ["top", "person",
"organizationalPerson", "user"])
TypeError: __str__ returned non-string (type NoneType)
UNEXPECTED(error): Basic tests (samba4.ldap.python (dc).Basic tests)
ENVLOG: SMBD LOG of: localdc1
ldb: RDN mismatch on
cn=ldaptestcomputer3,cn=computers,DC=samba,DC=example,DC=com: cn

CMD: /usr/bin/python ./lib/ldb/tests/python/ldap.py
ERROR: Exit code was 1

It seems that the change to not have automatic promotion from
messageElements to sets of strings has not been completed correctly, as
you can't run 'str' over the whole list. 


Andrew Bartlett
Andrew Bartlett
Authentication Developer, Samba Team           http://samba.org
Samba Developer, Red Hat Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20090107/9a24f49a/attachment.bin

More information about the samba-technical mailing list