From: Douglas Bagnall Date: Sat, 17 Aug 2024 08:18:02 +0000 (+1200) Subject: ldb:test:api_search: improve attribute access tests X-Git-Tag: tdb-1.4.13~1163 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69a00fd0d770c9fd3f45c5b43514c2acc8f927ce;p=thirdparty%2Fsamba.git ldb:test:api_search: improve attribute access tests `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 Reviewed-by: Andreas Schneider --- diff --git a/lib/ldb/tests/python/api_search.py b/lib/ldb/tests/python/api_search.py index e9c69b79073..3e443e385ae 100644 --- a/lib/ldb/tests/python/api_search.py +++ b/lib/ldb/tests/python/api_search.py @@ -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