From: Jo Sutton Date: Thu, 16 May 2024 02:41:17 +0000 (+1200) Subject: tests/krb5: Fix type errors by giving ‘pwd_last_set’ an appropriate type X-Git-Tag: tdb-1.4.11~234 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=7ae89d8d3c74e946125b7419f9a1459a5439f8d8;p=thirdparty%2Fsamba.git tests/krb5: Fix type errors by giving ‘pwd_last_set’ an appropriate type Signed-off-by: Jo Sutton Reviewed-by: Martin Schwenke --- diff --git a/python/samba/tests/krb5/pkinit_tests.py b/python/samba/tests/krb5/pkinit_tests.py index 1c87b041ad2..4783b125c95 100755 --- a/python/samba/tests/krb5/pkinit_tests.py +++ b/python/samba/tests/krb5/pkinit_tests.py @@ -39,7 +39,7 @@ import ldb import samba.tests from samba import credentials, generate_random_password, ntstatus from samba.nt_time import (nt_time_delta_from_timedelta, - nt_now, string_from_nt_time) + nt_now, NtTime, string_from_nt_time) from samba.dcerpc import security, netlogon from samba.dsdb import UF_PASSWORD_EXPIRED, UF_DONT_EXPIRE_PASSWD from samba.tests.pso import PasswordSettings @@ -1218,7 +1218,7 @@ class PkInitTests(KDCBaseTest): self._test_samlogon(creds=client_creds, logon_type=netlogon.NetlogonNetworkInformation) - pwd_last_set = int(res[0]["pwdLastSet"][0]) + pwd_last_set = NtTime(int(res[0]["pwdLastSet"][0])) self.assertGreater(pwd_last_set, 0) # This just checks the value is sensible