1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

tests/krb5: Fix assertElementFlags()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14642

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Joseph Sutton 2021-09-29 13:03:49 +13:00 committed by Andrew Bartlett
parent 8f6d369d70
commit 788b3a29ee
2 changed files with 4 additions and 4 deletions

View File

@ -1354,10 +1354,10 @@ class FAST_Tests(KDCBaseTest):
expected_flags = kdc_dict.pop('expected_flags', None)
if expected_flags is not None:
expected_flags = krb5_asn1.KDCOptions(expected_flags)
expected_flags = krb5_asn1.TicketFlags(expected_flags)
unexpected_flags = kdc_dict.pop('unexpected_flags', None)
if unexpected_flags is not None:
unexpected_flags = krb5_asn1.KDCOptions(unexpected_flags)
unexpected_flags = krb5_asn1.TicketFlags(unexpected_flags)
if rep_type == KRB_AS_REP:
kdc_exchange_dict = self.as_exchange_dict(

View File

@ -1053,14 +1053,14 @@ class RawKerberosTest(TestCaseInTempDir):
v = self.getElementValue(obj, elem)
self.assertIsNotNone(v)
if expected is not None:
self.assertIsInstance(expected, krb5_asn1.KDCOptions)
self.assertIsInstance(expected, krb5_asn1.TicketFlags)
for i, flag in enumerate(expected):
if flag == 1:
self.assertEqual('1', v[i],
f"'{expected.namedValues[i]}' "
f"expected in {v}")
if unexpected is not None:
self.assertIsInstance(unexpected, krb5_asn1.KDCOptions)
self.assertIsInstance(unexpected, krb5_asn1.TicketFlags)
for i, flag in enumerate(unexpected):
if flag == 1:
self.assertEqual('0', v[i],