summaryrefslogtreecommitdiff
path: root/lib/ldb/tests/python/api.py
diff options
context:
space:
mode:
authorJoseph Sutton <josephsutton@catalyst.net.nz>2022-09-15 16:16:43 +1200
committerAndrew Bartlett <abartlet@samba.org>2022-10-05 04:23:32 +0000
commit352064979be1245c6eb4ebe28bd46907207e0b28 (patch)
tree5ec360d66f2156ec61c859fe3a01817026ddd5ab /lib/ldb/tests/python/api.py
parentc52f5ee84ba5b8e7c9d2c67151cf3a6b9a7a780b (diff)
downloadsamba-352064979be1245c6eb4ebe28bd46907207e0b28.tar.gz
samba-352064979be1245c6eb4ebe28bd46907207e0b28.tar.bz2
samba-352064979be1245c6eb4ebe28bd46907207e0b28.zip
pyldb: Fix tests going unused
These tests are redeclared later and so are never used. Give them new names so that they will be run again. Signed-off-by: Joseph Sutton <josephsutton@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.py38
1 files changed, 15 insertions, 23 deletions
diff --git a/lib/ldb/tests/python/api.py b/lib/ldb/tests/python/api.py
index bf6f7ef993d..75abd0e3acc 100755
--- a/lib/ldb/tests/python/api.py
+++ b/lib/ldb/tests/python/api.py
@@ -1261,14 +1261,6 @@ class SearchTests(LdbBaseTest):
def test_subtree_unique_elsewhere2(self):
"""Testing a search"""
- res11 = self.l.search(base="DC=EXAMPLE,DC=COM",
- scope=ldb.SCOPE_SUBTREE,
- expression="(ou=ou10)")
- self.assertEqual(len(res11), 0)
-
- def test_subtree_unique_elsewhere2(self):
- """Testing a search"""
-
res11 = self.l.search(base="DC=EXAMPLE,DC=NET",
scope=ldb.SCOPE_SUBTREE,
expression="(ou=unique)")
@@ -1306,20 +1298,20 @@ class SearchTests(LdbBaseTest):
expression="(ou=unique)")
self.assertEqual(len(res11), 0)
- def test_subtree_unique_here(self):
+ def test_subtree_unique_elsewhere7(self):
"""Testing a search"""
- res11 = self.l.search(base="OU=UNIQUE,DC=EXAMPLE,DC=NET",
+ res11 = self.l.search(base="DC=EXAMPLE,DC=COM",
scope=ldb.SCOPE_SUBTREE,
- expression="(ou=unique)")
- self.assertEqual(len(res11), 1)
+ expression="(ou=ou10)")
+ self.assertEqual(len(res11), 0)
- def test_subtree_unique(self):
+ def test_subtree_unique_here(self):
"""Testing a search"""
- res11 = self.l.search(base="DC=SAMBA,DC=ORG",
+ res11 = self.l.search(base="OU=UNIQUE,DC=EXAMPLE,DC=NET",
scope=ldb.SCOPE_SUBTREE,
- expression="(ou=ou10)")
+ expression="(ou=unique)")
self.assertEqual(len(res11), 1)
def test_subtree_and_none(self):
@@ -1454,14 +1446,6 @@ class SearchTests(LdbBaseTest):
self.assertEqual(len(res11), 0)
def test_onelevel_unique_elsewhere2(self):
- """Testing a search"""
-
- res11 = self.l.search(base="DC=EXAMPLE,DC=COM",
- scope=ldb.SCOPE_ONELEVEL,
- expression="(ou=ou10)")
- self.assertEqual(len(res11), 0)
-
- def test_onelevel_unique_elsewhere2(self):
"""Testing a search (showing that onelevel is not subtree)"""
res11 = self.l.search(base="DC=EXAMPLE,DC=NET",
@@ -1493,6 +1477,14 @@ class SearchTests(LdbBaseTest):
expression="(ou=unique)")
self.assertEqual(len(res11), 0)
+ def test_onelevel_unique_elsewhere6(self):
+ """Testing a search"""
+
+ res11 = self.l.search(base="DC=EXAMPLE,DC=COM",
+ scope=ldb.SCOPE_ONELEVEL,
+ expression="(ou=ou10)")
+ self.assertEqual(len(res11), 0)
+
def test_onelevel_unique_here(self):
"""Testing a search"""