summaryrefslogtreecommitdiff
path: root/source4/dsdb/tests/python
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2011-10-22 13:03:44 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2011-10-27 18:52:28 +0200
commitc9ac02895138239126231ed9752f501ceb8f0747 (patch)
tree6ef1a4ce612249d19a1b3c9939ad66dbc8eee7fb /source4/dsdb/tests/python
parent5875661cf22a5d5d61bd1f60d0fb44debd66da28 (diff)
downloadsamba-c9ac02895138239126231ed9752f501ceb8f0747.tar.gz
samba-c9ac02895138239126231ed9752f501ceb8f0747.tar.bz2
samba-c9ac02895138239126231ed9752f501ceb8f0747.zip
s4:ldap.py - fix up the UTF8 tests
Reviewed-by: abartlet
Diffstat (limited to 'source4/dsdb/tests/python')
-rwxr-xr-xsource4/dsdb/tests/python/ldap.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/source4/dsdb/tests/python/ldap.py b/source4/dsdb/tests/python/ldap.py
index 05427d2d53..3cee5322b4 100755
--- a/source4/dsdb/tests/python/ldap.py
+++ b/source4/dsdb/tests/python/ldap.py
@@ -2250,8 +2250,8 @@ member: CN=ldaptestutf8user èùéìòà,CN=Users,""" + self.base_dn + """
self.assertTrue("member" not in res[0])
print "Testing ldb.search for (&(cn=ldaptestutf8user ÈÙÉÌÒÀ)(objectClass=user))"
-# TODO UTF8 users don't seem to work fully anymore
-# res = ldb.search(expression="(&(cn=ldaptestutf8user ÈÙÉÌÒÀ)(objectClass=user))")
+ res = ldb.search(expression="(&(cn=ldaptestutf8user ÈÙÉÌÒÀ)(objectClass=user))")
+ self.assertEquals(len(res), 1, "Could not find (&(cn=ldaptestutf8user ÈÙÉÌÒÀ)(objectClass=user))")
res = ldb.search(expression="(&(cn=ldaptestutf8user èùéìòà)(objectclass=user))")
self.assertEquals(len(res), 1, "Could not find (&(cn=ldaptestutf8user ÈÙÉÌÒÀ)(objectClass=user))")
@@ -2262,21 +2262,22 @@ member: CN=ldaptestutf8user èùéìòà,CN=Users,""" + self.base_dn + """
self.assertTrue("objectGUID" in res[0])
self.assertTrue("whenCreated" in res[0])
+ # delete "ldaptestutf8user"
ldb.delete(res[0].dn)
print "Testing ldb.search for (&(cn=ldaptestutf8user2*)(objectClass=user))"
res = ldb.search(expression="(&(cn=ldaptestutf8user2*)(objectClass=user))")
self.assertEquals(len(res), 1, "Could not find (&(cn=ldaptestutf8user2*)(objectClass=user))")
+ print "Testing ldb.search for (&(cn=ldaptestutf8user2 ÈÙÉÌÒÀ)(objectClass=user))"
+ res = ldb.search(expression="(&(cn=ldaptestutf8user2 ÈÙÉÌÒÀ)(objectClass=user))")
+ self.assertEquals(len(res), 1, "Could not find (&(cn=ldaptestutf8user2 ÈÙÉÌÒÀ)(objectClass=user))")
+
+ # delete "ldaptestutf8user2 "
ldb.delete(res[0].dn)
ldb.delete(("CN=ldaptestgroup2,CN=Users," + self.base_dn))
- print "Testing ldb.search for (&(cn=ldaptestutf8user2 ÈÙÉÌÒÀ)(objectClass=user))"
-# TODO UTF8 users don't seem to work fully anymore
-# res = ldb.search(expression="(&(cn=ldaptestutf8user ÈÙÉÌÒÀ)(objectClass=user))")
-# self.assertEquals(len(res), 1, "Could not find (&(cn=ldaptestutf8user ÈÙÉÌÒÀ)(objectClass=user))")
-
print "Testing that we can't get at the configuration DN from the main search base"
res = ldb.search(self.base_dn, expression="objectClass=crossRef", scope=SCOPE_SUBTREE, attrs=["cn"])
self.assertEquals(len(res), 0)