From 7d4d819b90f23cffbe437566818e29c394800b9e Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Thu, 5 May 2016 16:56:24 +0200 Subject: test_cert_plugin: Encode 'certificate' for comparison with 'usercertificate' The 'certificate' option is Str, but 'usercertificate' is Bytes. Decode before comparing one with the other. Part of the work for: https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Martin Basti --- ipatests/test_xmlrpc/test_cert_plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ipatests') diff --git a/ipatests/test_xmlrpc/test_cert_plugin.py b/ipatests/test_xmlrpc/test_cert_plugin.py index 1276e9cf9..7f320c157 100644 --- a/ipatests/test_xmlrpc/test_cert_plugin.py +++ b/ipatests/test_xmlrpc/test_cert_plugin.py @@ -149,7 +149,7 @@ class test_cert(XMLRPC_test): res = api.Command['cert_request'](csr, principal=self.service_princ, add=True)['result'] assert DN(res['subject']) == self.subject # save the cert for the service_show/find tests - cert = res['certificate'] + cert = res['certificate'].encode('ascii') def test_0003_service_show(self): """ @@ -180,7 +180,7 @@ class test_cert(XMLRPC_test): res = api.Command['cert_request'](csr, principal=self.service_princ)['result'] assert DN(res['subject']) == self.subject # save the cert for the service_show/find tests - newcert = res['certificate'] + newcert = res['certificate'].encode('ascii') def test_0006_service_show(self): """ -- cgit