summaryrefslogtreecommitdiff
path: root/lib/ldb/tests/python/api.py
diff options
context:
space:
mode:
authorGary Lockyer <gary@catalyst.net.nz>2018-03-20 12:14:10 +1300
committerAndrew Bartlett <abartlet@samba.org>2018-05-03 08:17:45 +0200
commit9ca34b9c4aca9fa39759181f262ff693a9c6eb5c (patch)
tree1b34c3a902c2d6121caec88f32c829449679e0ef /lib/ldb/tests/python/api.py
parent25e1cfad3afd936227d8240666c61b2b339a74ba (diff)
downloadsamba-9ca34b9c4aca9fa39759181f262ff693a9c6eb5c.tar.gz
samba-9ca34b9c4aca9fa39759181f262ff693a9c6eb5c.tar.bz2
samba-9ca34b9c4aca9fa39759181f262ff693a9c6eb5c.zip
ldb tests: api ensure database correctly populated
Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'lib/ldb/tests/python/api.py')
-rwxr-xr-xlib/ldb/tests/python/api.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/ldb/tests/python/api.py b/lib/ldb/tests/python/api.py
index 12409a8c991..6a3790afa36 100755
--- a/lib/ldb/tests/python/api.py
+++ b/lib/ldb/tests/python/api.py
@@ -1221,6 +1221,19 @@ class AddModifyTests(LdbBaseTest):
"name": b"Admins",
"x": "z", "y": "a",
"objectUUID": b"0123456789abcde2"})
+
+ res2 = self.l.search(base="DC=SAMBA,DC=ORG",
+ scope=ldb.SCOPE_SUBTREE,
+ expression="(objectUUID=0123456789abcde1)")
+ self.assertEqual(len(res2), 1)
+ self.assertEqual(str(res2[0].dn), "OU=DUP,DC=SAMBA,DC=ORG")
+
+ res3 = self.l.search(base="DC=SAMBA,DC=ORG",
+ scope=ldb.SCOPE_SUBTREE,
+ expression="(objectUUID=0123456789abcde2)")
+ self.assertEqual(len(res3), 1)
+ self.assertEqual(str(res3[0].dn), "OU=DUP2,DC=SAMBA,DC=ORG")
+
try:
self.l.rename("OU=DUP,DC=SAMBA,DC=ORG",
"OU=DUP2,DC=SAMBA,DC=ORG")