My directory contain ldap element that have in DN some uppercase letters.
Because mockldap change the DN in a lowercase DN, some problems occurs.
For example, with the django-db backend.
- When change an attribute on an object and then save it, django-db think that my object was renamed and try to update them.
I can try to take a look at this some time, but it seems unlikely that we could casually make this change without breaking existing clients. This might be the right thing to do in the long run, but it's a long road to be sure that it's doing more good than harm. A safer alternative, especially in the short term, might be to add some kind of configuration option that controls case-preserving behavior. With unit tests and documentation, as always.
Changes on this pull request will surely break existing clients. I have made other change in my fork of this usefull project that I think will not break existing clients and will correct myissues. If you have some time, take a look in my fork.
I remove lower() on directory init and addition.
I change the _s_search method like this