summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2018-11-15 16:06:15 +0000
committerNoel Power <npower@samba.org>2018-12-10 10:38:22 +0100
commit991f8bfe5fba3838ace9138fa0fb59c07ffc9e45 (patch)
tree5fe2361974ef69299196339df601092cc9ccc36c /python
parent0cafa9bf943c3980ffe10b1fa0bb325bb36a6fad (diff)
downloadsamba-991f8bfe5fba3838ace9138fa0fb59c07ffc9e45.tar.gz
python/samba/tests: PY3 port failing samba.tests.auth_log_netlogon
Fix password encoding Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python')
-rw-r--r--python/samba/tests/auth_log_netlogon.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/python/samba/tests/auth_log_netlogon.py b/python/samba/tests/auth_log_netlogon.py
index 9b0512d8c5b..5d47d22f57a 100644
--- a/python/samba/tests/auth_log_netlogon.py
+++ b/python/samba/tests/auth_log_netlogon.py
@@ -35,6 +35,7 @@ from samba.auth import system_session
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 AuthLogTestsNetLogon(samba.tests.auth_log_base.AuthLogTestBase):
@@ -58,9 +59,7 @@ class AuthLogTestsNetLogon(samba.tests.auth_log_base.AuthLogTestBase):
self.dn = ("cn=%s,cn=users,%s" %
(self.netbios_name, self.base_dn))
- 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.dn,
"objectclass": "computer",