mirror of
https://github.com/samba-team/samba.git
synced 2025-01-03 01:18:10 +03:00
s4/pytest: remove py2 str/bytes workaround in getnc_exop
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
788ef8f07c
commit
de19f4d675
@ -1093,7 +1093,7 @@ class DrsReplicaPrefixMapTestCase(drs_base.DrsBaseTestCase):
|
|||||||
schi = drsuapi.DsReplicaOIDMapping()
|
schi = drsuapi.DsReplicaOIDMapping()
|
||||||
schi.id_prefix = 0
|
schi.id_prefix = 0
|
||||||
if 'schemaInfo' in res[0]:
|
if 'schemaInfo' in res[0]:
|
||||||
binary_oid = [x if isinstance(x, int) else ord(x) for x in res[0]['schemaInfo'][0]]
|
binary_oid = list(res[0]['schemaInfo'][0])
|
||||||
schi.oid.length = len(binary_oid)
|
schi.oid.length = len(binary_oid)
|
||||||
schi.oid.binary_oid = binary_oid
|
schi.oid.binary_oid = binary_oid
|
||||||
else:
|
else:
|
||||||
@ -1102,7 +1102,7 @@ class DrsReplicaPrefixMapTestCase(drs_base.DrsBaseTestCase):
|
|||||||
schema_info.marker = 0xFF
|
schema_info.marker = 0xFF
|
||||||
schema_info.invocation_id = misc.GUID(samdb.get_invocation_id())
|
schema_info.invocation_id = misc.GUID(samdb.get_invocation_id())
|
||||||
|
|
||||||
binary_oid = [x if isinstance(x, int) else ord(x) for x in ndr_pack(schema_info)]
|
binary_oid = list(ndr_pack(schema_info))
|
||||||
# you have to set the length before setting binary_oid
|
# you have to set the length before setting binary_oid
|
||||||
schi.oid.length = len(binary_oid)
|
schi.oid.length = len(binary_oid)
|
||||||
schi.oid.binary_oid = binary_oid
|
schi.oid.binary_oid = binary_oid
|
||||||
|
Loading…
Reference in New Issue
Block a user