From 0ebbb48dc4cf0b9df78363f6a683c388634c595f Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: May 10 2016 10:47:32 +0000 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 --- diff --git a/ipatests/test_xmlrpc/test_cert_plugin.py b/ipatests/test_xmlrpc/test_cert_plugin.py index 97e56fc..a3839d0 100644 --- a/ipatests/test_xmlrpc/test_cert_plugin.py +++ b/ipatests/test_xmlrpc/test_cert_plugin.py @@ -150,7 +150,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): """ @@ -181,7 +181,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): """