def setUp(self): self.strdn = "cn=user,dc=test,dc=local" self.dn = LDAPDN(self.strdn)
def invalid(self): return LDAPDN("cn=test,dc=one+two")
def test_emptydn(self): empty = LDAPDN("") self.assertEqual(empty.get_ancestors(), "")
def test_equel(self): self.assertEqual(self.dn, LDAPDN(self.strdn))
def test_bind_properties(self): self.assertEqual(self.url.basedn, LDAPDN("cn=test,dc=test")) self.assertEqual(self.url.scope, "base") self.assertEqual(self.url.filter, "(objectclass=*)") self.assertEqual(self.url.attributes, ["sn", "gn"])