1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

selftest: enable py3 for samba.tests.dcerpc.rpcecho

Prefix `b` for bytes.

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
Joe Guo 2018-04-11 16:38:03 +12:00 committed by Douglas Bagnall
parent e209cc2ee2
commit 9b8b40fabf
2 changed files with 4 additions and 4 deletions

View File

@ -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)

View File

@ -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)