From: Noel Power Date: Mon, 30 Apr 2018 17:31:36 +0000 (+0100) Subject: python/samba/tests: ensure byte content (not strings) X-Git-Tag: tdb-1.3.17~1909 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c958a04327b4c6598cf8666edfbd44fc5fa15c96;p=thirdparty%2Fsamba.git python/samba/tests: ensure byte content (not strings) Signed-off-by: Noel Power Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/tests/dcerpc/raw_testcase.py b/python/samba/tests/dcerpc/raw_testcase.py index 25faddb9a2d..32d45d53292 100644 --- a/python/samba/tests/dcerpc/raw_testcase.py +++ b/python/samba/tests/dcerpc/raw_testcase.py @@ -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