diff --git a/tests/magtests.py b/tests/magtests.py index 6414503..f14f47a 100755 --- a/tests/magtests.py +++ b/tests/magtests.py @@ -431,7 +431,7 @@ def kinit_user(testdir, kdcenv): stdin=subprocess.PIPE, stdout=logfile, stderr=logfile, env=testenv, preexec_fn=os.setsid) - kinit.communicate('%s\n' % USR_PWD) + kinit.communicate(('%s\n' % USR_PWD).encode("utf8")) kinit.wait() if kinit.returncode != 0: raise ValueError('kinit failed') @@ -495,6 +495,7 @@ def test_spnego_auth(testdir, testenv, logfile): else: sys.stderr.write('SPNEGO No Auth: SUCCESS\n') + return error_count diff --git a/tests/t_spnego_proxy.py b/tests/t_spnego_proxy.py index 6219721..c47558b 100755 --- a/tests/t_spnego_proxy.py +++ b/tests/t_spnego_proxy.py @@ -17,7 +17,7 @@ def getAuthToken(target): ctx = gssapi.SecurityContext(name=name, mech=spnego_mech) token = ctx.step() - return 'Negotiate %s' % b64encode(token) + return 'Negotiate %s' % b64encode(token).decode() if __name__ == '__main__':