From: Noel Power Date: Wed, 9 May 2018 10:37:16 +0000 (+0100) Subject: python/samba/tests: py3 port for samba.test.password_hash_ldap X-Git-Tag: tdb-1.3.17~1757 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d18ef26562615f91dd1065f9213a2a57285e605;p=thirdparty%2Fsamba.git python/samba/tests: py3 port for samba.test.password_hash_ldap user samba.compat.text_type instead of unicode in py2 text_type is an alias for unicode in py3 text_type is an alias for str (which does nothing if the input is already str) Signed-off-by: Noel Power Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/tests/password_hash_ldap.py b/python/samba/tests/password_hash_ldap.py index c1e6cd57442..5bb407e0906 100644 --- a/python/samba/tests/password_hash_ldap.py +++ b/python/samba/tests/password_hash_ldap.py @@ -46,6 +46,7 @@ from samba.ndr import ndr_unpack from samba.dcerpc import drsblobs, drsuapi, misc from samba import drs_utils, net from samba.credentials import Credentials +from samba.compat import text_type import binascii import os @@ -72,7 +73,7 @@ class PassWordHashLDAPTests(PassWordHashTests): req8.destination_dsa_guid = null_guid req8.source_dsa_invocation_id = null_guid req8.naming_context = drsuapi.DsReplicaObjectIdentifier() - req8.naming_context.dn = unicode(dn) + req8.naming_context.dn = text_type(dn) req8.highwatermark = drsuapi.DsReplicaHighWaterMark() req8.highwatermark.tmp_highest_usn = 0