Make sure correctly encode password to utf16 and not use
unicode (which doesn't exist in PY3)
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
from samba.tests import delete_force
from samba.dsdb import UF_WORKSTATION_TRUST_ACCOUNT, UF_PASSWD_NOTREQD
from samba.dcerpc.misc import SEC_CHAN_WKSTA
+from samba.compat import text_type
class AuthLogTestsSamLogon(samba.tests.auth_log_base.AuthLogTestBase):
else:
binding = "[schannel]"
- utf16pw = unicode(
- '"' + self.machinepass.encode('utf-8') + '"', 'utf-8'
- ).encode('utf-16-le')
+ utf16pw = text_type('"' + self.machinepass + '"').encode('utf-16-le')
self.ldb.add({
"dn": self.samlogon_dn,
"objectclass": "computer",