Closed kainz closed 9 years ago
It seems this addresses the same issue as #5, right? Could you try to add a test?
@fschulze Yep, this does address #5.
I've attached a test for you, but it doesn't really test the code at that spot in devpi_ldap/main.py, because your mocking design mocks out actually running the _search()
, so that piece of code doesn't really have any test coverage, anyway.
Implement a fallback in user_search which will use a toplevel response attribute instead of object attributes if you are searching on 'dn' or 'distinguishedName' and those do not appear within a returned ldap object.
This happens in our site using redhat directory service, and may be useful for others.