[python-ldap] Ldif record parsing

Joseph L. Casale jcasale at activenetwerx.com
Mon Feb 17 16:57:25 CET 2014


I was writing some unit tests for an app and noticed for delete changetype records with
only an dn and no entry records that LDIFParser.parse only hands the parsed data off to
handle() if the entry has records. Obviously most of the time this makes sense but as the
changetype is local to parse(), it's not available even during other cases where an entry
exists. As a result, tests never fully validate.

I could simply redefine parse() but I wonder how other people addressed this when
writing tests?

Thanks,
jlc


More information about the python-ldap mailing list