and thank you for the approval! I think the regexp is too restrictive, but it covers my case so far, I'll extend it in the future in case I need more functionality. One additional question, I saw that python-ldap returns an empty list in case there are no results found, while MockLDAP raises NO_SUCH_OBJECT excpetion. Is there any reason this is happening or is it a bug?
They're not deliberately different. I must have observed python-ldap raising the exception in some circumstance and mimicked it. Perhaps the behavior varies depending on the type of query. Might be worth investigating.