auth/credentials/test: py2/py3 compat always decode result of b64encode
authorNoel Power <noel.power@suse.com>
Fri, 4 May 2018 14:30:22 +0000 (15:30 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Sat, 12 May 2018 22:24:35 +0000 (00:24 +0200)
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sun May 13 00:24:35 CEST 2018 on sn-devel-144

auth/credentials/tests/bind.py

index 8b08b4a709a9437918b386d853632ab6b0c30c04..e612dfc7d8a5aba08769707fba92b94642721da9 100755 (executable)
@@ -96,7 +96,7 @@ operatingSystem: Windows Server 2003
 dn: """ + self.computer_dn + """
 changetype: modify
 replace: unicodePwd
-unicodePwd:: """ + base64.b64encode("\"P@ssw0rd\"".encode('utf-16-le')) + """
+unicodePwd:: """ + base64.b64encode(u"\"P@ssw0rd\"".encode('utf-16-le')).decode('utf8') + """
 """)
 
         # do a simple bind and search with the machine account