diff options
author | Joseph Sutton <josephsutton@catalyst.net.nz> | 2023-02-13 15:05:38 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2023-05-16 23:29:32 +0000 |
commit | 23a67d59c82b71cada5578e1c393ff42ca9d1b17 (patch) | |
tree | 006512fa1277eec7469761a60ae3cc5430b2e637 /source4 | |
parent | db5ef4e2bacb821ead3aabf2bab09e37602afdb3 (diff) | |
download | samba-23a67d59c82b71cada5578e1c393ff42ca9d1b17.tar.gz |
s4-dsdb:large_ldap: Remove unused variables
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/dsdb/tests/python/large_ldap.py | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/source4/dsdb/tests/python/large_ldap.py b/source4/dsdb/tests/python/large_ldap.py index 8c70e1669af..d30924ead9c 100644 --- a/source4/dsdb/tests/python/large_ldap.py +++ b/source4/dsdb/tests/python/large_ldap.py @@ -98,7 +98,6 @@ class ManyLDAPTest(samba.tests.TestCase): self.fail(msg="This test is only valid on ldap") count = 0 - msg1 = None search1 = self.ldb.search_iterator(base=self.ou_dn, expression="(ou=" + self.OU_NAME_MANY + "*)", scope=ldb.SCOPE_SUBTREE, @@ -107,7 +106,7 @@ class ManyLDAPTest(samba.tests.TestCase): for reply in search1: self.assertIsInstance(reply, ldb.Message) count += 1 - res1 = search1.result() + search1.result() # Check we got everything self.assertEqual(count, 2001) @@ -161,7 +160,6 @@ class LargeLDAPTest(samba.tests.TestCase): self.fail(msg="This test is only valid on ldap") count = 0 - msg1 = None search1 = self.ldb.search_iterator(base=self.ou_dn, expression="(sAMAccountName=" + self.USER_NAME + "*)", scope=ldb.SCOPE_SUBTREE, @@ -171,14 +169,13 @@ class LargeLDAPTest(samba.tests.TestCase): self.assertIsInstance(reply, ldb.Message) count += 1 - res1 = search1.result() + search1.result() self.assertEqual(count, 200) # Now try breaking the 256MB limit count_jpeg = 0 - msg1 = None search1 = self.ldb.search_iterator(base=self.ou_dn, expression="(sAMAccountName=" + self.USER_NAME + "*)", scope=ldb.SCOPE_SUBTREE, @@ -186,7 +183,6 @@ class LargeLDAPTest(samba.tests.TestCase): try: for reply in search1: self.assertIsInstance(reply, ldb.Message) - msg1 = reply count_jpeg += 1 except LdbError as err: enum = err.args[0] @@ -206,7 +202,6 @@ class LargeLDAPTest(samba.tests.TestCase): # Now try for just 100MB (server will do some chunking for this) count_jpeg2 = 0 - msg1 = None try: search1 = self.ldb.search_iterator(base=self.ou_dn, expression="(sAMAccountName=" + self.USER_NAME + "1*)", @@ -219,7 +214,6 @@ class LargeLDAPTest(samba.tests.TestCase): for reply in search1: self.assertIsInstance(reply, ldb.Message) - msg1 = reply count_jpeg2 += 1 # Assert we got some entries @@ -231,7 +225,6 @@ class LargeLDAPTest(samba.tests.TestCase): self.fail(msg="This test is only valid on ldap") count = 0 - msg1 = None search1 = self.ldb.search_iterator(base=self.ou_dn, expression="(&(objectClass=user)(sAMAccountName=" + self.USER_NAME + "*))", scope=ldb.SCOPE_SUBTREE, @@ -240,14 +233,13 @@ class LargeLDAPTest(samba.tests.TestCase): for reply in search1: self.assertIsInstance(reply, ldb.Message) count += 1 - res1 = search1.result() + search1.result() self.assertEqual(count, 200) # Now try breaking the 256MB limit count_jpeg = 0 - msg1 = None search1 = self.ldb.search_iterator(base=self.ou_dn, expression="(&(objectClass=user)(sAMAccountName=" + self.USER_NAME + "*))", scope=ldb.SCOPE_SUBTREE, |