summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tests/python/ldap.py
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-08-22 17:37:43 +1000
committerAndrew Tridgell <tridge@samba.org>2008-08-22 17:37:43 +1000
commit0a27ff953e17670aecc7aedb56c0f872cc4bb75d (patch)
tree18ed167d94e1a50acf04bc22fc6d8f01bf7f1a5f /source4/lib/ldb/tests/python/ldap.py
parent8acc7f7da7718c7750387c1043391618be46e15b (diff)
parentcc43037f19056ed24d7fffa54456d597c63ad105 (diff)
downloadsamba-0a27ff953e17670aecc7aedb56c0f872cc4bb75d.tar.gz
samba-0a27ff953e17670aecc7aedb56c0f872cc4bb75d.tar.bz2
samba-0a27ff953e17670aecc7aedb56c0f872cc4bb75d.zip
Merge branch 'abartlet-4-0-local' into v4-0-test
(This used to be commit 469fac2669991b130dec219e1a109a8b2ce224be)
Diffstat (limited to 'source4/lib/ldb/tests/python/ldap.py')
-rwxr-xr-xsource4/lib/ldb/tests/python/ldap.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/source4/lib/ldb/tests/python/ldap.py b/source4/lib/ldb/tests/python/ldap.py
index 13d4adf6d4..11a824a549 100755
--- a/source4/lib/ldb/tests/python/ldap.py
+++ b/source4/lib/ldb/tests/python/ldap.py
@@ -331,15 +331,15 @@ servicePrincipalName: host/ldaptest2computer29
print "Testing Ambigious Name Resolution"
# Testing ldb.search for (&(anr=ldap testy)(objectClass=user))
res = ldb.search(expression="(&(anr=ldap testy)(objectClass=user))")
- self.assertEquals(len(res), 3, "Could not find (&(anr=ldap testy)(objectClass=user))")
+ self.assertEquals(len(res), 3, "Found only %d of 3 for (&(anr=ldap testy)(objectClass=user))" % len(res))
# Testing ldb.search for (&(anr=testy ldap)(objectClass=user))
res = ldb.search(expression="(&(anr=testy ldap)(objectClass=user))")
- self.assertEquals(len(res), 2, "Found only %d for (&(anr=testy ldap)(objectClass=user))" % len(res))
+ self.assertEquals(len(res), 2, "Found only %d of 2 for (&(anr=testy ldap)(objectClass=user))" % len(res))
# Testing ldb.search for (&(anr=ldap)(objectClass=user))
res = ldb.search(expression="(&(anr=ldap)(objectClass=user))")
- self.assertEquals(len(res), 4, "Found only %d for (&(anr=ldap)(objectClass=user))" % len(res))
+ self.assertEquals(len(res), 4, "Found only %d of 4 for (&(anr=ldap)(objectClass=user))" % len(res))
# Testing ldb.search for (&(anr==ldap)(objectClass=user))
res = ldb.search(expression="(&(anr==ldap)(objectClass=user))")
@@ -353,13 +353,13 @@ servicePrincipalName: host/ldaptest2computer29
res = ldb.search(expression="(&(anr=testy)(objectClass=user))")
self.assertEquals(len(res), 2, "Found only %d for (&(anr=testy)(objectClass=user))" % len(res))
- # Testing ldb.search for (&(anr=ldap testy)(objectClass=user))
+ # Testing ldb.search for (&(anr=testy ldap)(objectClass=user))
res = ldb.search(expression="(&(anr=testy ldap)(objectClass=user))")
- self.assertEquals(len(res), 2, "Found only %d for (&(anr=ldap testy)(objectClass=user))" % len(res))
+ self.assertEquals(len(res), 2, "Found only %d for (&(anr=testy ldap)(objectClass=user))" % len(res))
- # Testing ldb.search for (&(anr==ldap testy)(objectClass=user))
+ # Testing ldb.search for (&(anr==testy ldap)(objectClass=user))
res = ldb.search(expression="(&(anr==testy ldap)(objectClass=user))")
- self.assertEquals(len(res), 1, "Found only %d for (&(anr==ldap testy)(objectClass=user))" % len(res))
+ self.assertEquals(len(res), 1, "Found only %d for (&(anr==testy ldap)(objectClass=user))" % len(res))
self.assertEquals(str(res[0].dn), ("CN=ldaptestuser,CN=Users," + self.base_dn))
self.assertEquals(res[0]["cn"][0], "ldaptestuser")