From 91e66b905484423d545e12dd110717ff7e4e4ddc Mon Sep 17 00:00:00 2001 From: Martin Basti Date: Sep 22 2016 13:20:58 +0000 Subject: Test: dont use global variable for iteration in test_cert_plugin Iteration over global variable causes unwanted value changes outside method https://fedorahosted.org/freeipa/ticket/5755 Reviewed-By: Martin Babinsky --- diff --git a/ipatests/test_xmlrpc/test_cert_plugin.py b/ipatests/test_xmlrpc/test_cert_plugin.py index fb4ab58..2598e0b 100644 --- a/ipatests/test_xmlrpc/test_cert_plugin.py +++ b/ipatests/test_xmlrpc/test_cert_plugin.py @@ -215,7 +215,9 @@ class test_cert(XMLRPC_test): res = api.Command['service_show'](self.service_princ)['result'] # Both the old and the new certs should be listed as certificates now - certs_encoded = (base64.b64encode(cert) for cert in res['usercertificate']) + certs_encoded = ( + base64.b64encode(usercert) for usercert in res['usercertificate'] + ) assert set(certs_encoded) == set([cert, newcert]) def test_0008_cleanup(self):