]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
pytest: remove py2 str/bytes workaround in auth_log_samlogon
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Tue, 11 Jun 2024 23:15:50 +0000 (11:15 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 12 Jun 2024 08:14:34 +0000 (08:14 +0000)
It is likely not necessary to cast to list() in most cases.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/auth_log_samlogon.py

index f3dfebab0cc26c6d46c438319a5c0b13dd6d8d75..8ccf9b12e955514a36d49aaae3e1d4e872ef6952 100644 (file)
@@ -126,14 +126,10 @@ class AuthLogTestsSamLogon(samba.tests.auth_log_base.AuthLogTestBase):
         logon_level = netlogon.NetlogonNetworkTransitiveInformation
         logon = samba.dcerpc.netlogon.netr_NetworkInfo()
 
-        logon.challenge = [
-            x if isinstance(x, int) else ord(x) for x in challenge]
+        logon.challenge = list(challenge)
         logon.nt = netlogon.netr_ChallengeResponse()
         logon.nt.length = len(response["nt_response"])
-        logon.nt.data = [
-            x if isinstance(x, int) else ord(x) for
-            x in response["nt_response"]
-        ]
+        logon.nt.data = list(response["nt_response"])
         logon.identity_info = samba.dcerpc.netlogon.netr_IdentityInfo()
         (username, domain) = creds.get_ntlm_username_domain()