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:
parent
8f6d369d70
commit
788b3a29ee
@ -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(
|
||||
|
@ -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],
|
||||
|
Loading…
Reference in New Issue
Block a user