pyldb: Fix tests going unused
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Thu, 15 Sep 2022 04:16:43 +0000 (16:16 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 5 Oct 2022 04:23:32 +0000 (04:23 +0000)
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>
lib/ldb/tests/python/api.py

index bf6f7ef993da51b69fb2f079fa423eed37e8881d..75abd0e3acce4fab53dfb08f74a80ece42da6921 100755 (executable)
@@ -1258,14 +1258,6 @@ class SearchTests(LdbBaseTest):
                               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=COM",
-                              scope=ldb.SCOPE_SUBTREE,
-                              expression="(ou=ou10)")
-        self.assertEqual(len(res11), 0)
-
     def test_subtree_unique_elsewhere2(self):
         """Testing a search"""
 
@@ -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):
@@ -1453,14 +1445,6 @@ class SearchTests(LdbBaseTest):
                               expression="(ou=ou10)")
         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)"""
 
@@ -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"""