]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ldb:test:api_search: improve attribute access tests
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Sat, 17 Aug 2024 08:18:02 +0000 (20:18 +1200)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 24 Sep 2024 09:14:38 +0000 (09:14 +0000)
`list = res.msgs` tests nothing more than a bare `res.msgs`,
and we can instead assert that the result is a list.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
lib/ldb/tests/python/api_search.py

index e9c69b79073b7a072ac3907b0de8eb5573ab67b9..3e443e385aee0ac82ae1de380c44f053249f0c10 100644 (file)
@@ -1388,15 +1388,15 @@ class LdbResultTests(LdbBaseTest):
 
     def test_get_msgs(self):
         res = self.l.search()
-        list = res.msgs
+        self.assertIsInstance(res.msgs, list)
 
     def test_get_controls(self):
         res = self.l.search()
-        list = res.controls
+        self.assertIsInstance(res.controls, list)
 
     def test_get_referals(self):
         res = self.l.search()
-        list = res.referals
+        self.assertIsInstance(res.referals, list)
 
     def test_iter_msgs(self):
         found = False