From 929086e0992cc32a654b4dfa435f536ecb0c665b Mon Sep 17 00:00:00 2001 From: Martin Basti Date: Thu, 22 Sep 2016 14:12:14 +0200 Subject: [PATCH] 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 --- ipatests/test_xmlrpc/test_cert_plugin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ipatests/test_xmlrpc/test_cert_plugin.py b/ipatests/test_xmlrpc/test_cert_plugin.py index fb4ab582d..2598e0b09 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):