diff --git a/python/samba/tests/dcerpc/rpcecho.py b/python/samba/tests/dcerpc/rpcecho.py index 099f8f619ce..33cb867f09c 100644 --- a/python/samba/tests/dcerpc/rpcecho.py +++ b/python/samba/tests/dcerpc/rpcecho.py @@ -53,7 +53,7 @@ class RpcEchoTests(RpcInterfaceTestCase): self.assertEquals(8 * [0], y.surrounding) def test_manual_request(self): - self.assertEquals("\x01\x00\x00\x00", self.conn.request(0, chr(0) * 4)) + self.assertEquals(b"\x01\x00\x00\x00", self.conn.request(0, chr(0) * 4)) def test_server_name(self): self.assertEquals(None, self.conn.server_name) @@ -64,8 +64,8 @@ class NdrEchoTests(TestCase): def test_info1_push(self): x = echo.info1() x.v = 42 - self.assertEquals("\x2a", ndr_pack(x)) + self.assertEquals(b"\x2a", ndr_pack(x)) def test_info1_pull(self): - x = ndr_unpack(echo.info1, "\x42") + x = ndr_unpack(echo.info1, b"\x42") self.assertEquals(x.v, 66) diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py index 95058b1ea2c..076c0e28f48 100755 --- a/source4/selftest/tests.py +++ b/source4/selftest/tests.py @@ -619,7 +619,7 @@ planpythontestsuite("none", "samba.tests.samba_tool.help") planpythontestsuite("chgdcpass:local", "samba.tests.samba_tool.sites") planpythontestsuite("chgdcpass:local", "samba.tests.samba_tool.dnscmd") -planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.dcerpc.rpcecho") +planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.dcerpc.rpcecho", py3_compatible=True) planoldpythontestsuite("nt4_dc", "samba.tests.netbios", extra_args=['-U"$USERNAME%$PASSWORD"'], py3_compatible=True) planoldpythontestsuite("ad_dc:local", "samba.tests.gpo", extra_args=['-U"$USERNAME%$PASSWORD"'], py3_compatible=True)