mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
python/samba/tests: ensure byte content (not strings)
Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
b3a5dac3e3
commit
c958a04327
@ -139,7 +139,7 @@ class RawDCERPCTest(TestCase):
|
||||
ctx_list = [ctx]
|
||||
|
||||
if auth_context is not None:
|
||||
from_server = ""
|
||||
from_server = b""
|
||||
(finished, to_server) = auth_context["gensec"].update(from_server)
|
||||
self.assertFalse(finished)
|
||||
|
||||
@ -148,7 +148,7 @@ class RawDCERPCTest(TestCase):
|
||||
auth_context_id=auth_context["auth_context_id"],
|
||||
auth_blob=to_server)
|
||||
else:
|
||||
auth_info = ""
|
||||
auth_info = b""
|
||||
|
||||
req = self.generate_bind(call_id=call_id,
|
||||
pfc_flags=pfc_flags,
|
||||
@ -333,14 +333,14 @@ class RawDCERPCTest(TestCase):
|
||||
else:
|
||||
sig_size = 16
|
||||
|
||||
zero_sig = "\x00" * sig_size
|
||||
zero_sig = b"\x00" * sig_size
|
||||
auth_info = self.generate_auth(auth_type=auth_context["auth_type"],
|
||||
auth_level=auth_context["auth_level"],
|
||||
auth_pad_length=auth_pad_length,
|
||||
auth_context_id=auth_context["auth_context_id"],
|
||||
auth_blob=zero_sig)
|
||||
else:
|
||||
auth_info = ""
|
||||
auth_info = b""
|
||||
|
||||
pfc_flags = samba.dcerpc.dcerpc.DCERPC_PFC_FLAG_FIRST
|
||||
pfc_flags |= samba.dcerpc.dcerpc.DCERPC_PFC_FLAG_LAST
|
||||
@ -615,7 +615,7 @@ class RawDCERPCTest(TestCase):
|
||||
if hexdump:
|
||||
sys.stderr.write("generate_auth: %d\n%s" % (len(ai), self.hexdump(ai)))
|
||||
else:
|
||||
ai = ""
|
||||
ai = b""
|
||||
|
||||
return ai
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user