Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DistinguishedName comparison should only be about hierarchy relation #94

Open
adiroiban opened this issue Jan 15, 2018 · 0 comments
Open

Comments

@adiroiban
Copy link
Member

See this test which now pass, but which I think should raise an exception as you should not compare such elements

I don't have a use case for such a comparison.

I am opening this issue to gather feedback

https://www.ldap.com/ldap-dns-and-rdns

Most LDAP client APIs offer some mechanism for comparing DNs (e.g., to determine whether they are equal, or to determine whether they are hierarchically related)


    def test_parent_unrelated(self):
        """
        Children from different parents should not be compared

        This pass now
        """
        dn1=dn.DistinguishedName('dc=ab,dc=abc,dc=com')
        dn2=dn.DistinguishedName('dc=ba,dc=example,dc=com')

        self.assertLess(dn1, dn2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant