From: Joseph Sutton Date: Thu, 15 Sep 2022 04:16:43 +0000 (+1200) Subject: pyldb: Fix tests going unused X-Git-Tag: talloc-2.4.0~760 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=352064979be1245c6eb4ebe28bd46907207e0b28;p=thirdparty%2Fsamba.git 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 Reviewed-by: Andrew Bartlett --- 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 @@ -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"""