From: Stefan Metzmacher Date: Wed, 12 Mar 2025 13:14:51 +0000 (+0100) Subject: python:tests/krb5: let check_device_info() allow an empty rid array X-Git-Tag: tevent-0.17.0~378 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b4b9ae0ea2a5f533cf249c9bdd5159f832f40a0;p=thirdparty%2Fsamba.git python:tests/krb5: let check_device_info() allow an empty rid array Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme --- diff --git a/python/samba/tests/krb5/raw_testcase.py b/python/samba/tests/krb5/raw_testcase.py index e1de6b23d90..e5f155fd55c 100644 --- a/python/samba/tests/krb5/raw_testcase.py +++ b/python/samba/tests/krb5/raw_testcase.py @@ -4569,7 +4569,8 @@ class RawKerberosTest(TestCase): # Collect the groups. if device_info.groups.rids is not None: - self.assertTrue(device_info.groups.rids, 'got empty RIDs') + self.assertEqual(len(device_info.groups.rids), + device_info.groups.count) for group in device_info.groups.rids: got_sid = f'{device_domain_sid}-{group.rid}' @@ -4581,6 +4582,8 @@ class RawKerberosTest(TestCase): continue self.assertNotIn(device_sid, got_sids, 'got duplicated SID') got_sids.add(device_sid) + else: + self.assertEqual(device_info.groups.count, 0) # Collect the SIDs. if device_info.sids is not None: