URL: https://github.com/freeipa/freeipa/pull/105
Author: mbasti-rh
 Title: #105: Test: dont use global variable for iteration in test_cert_plugin
Action: opened

PR body:
"""
Iteration over global variable causes unwanted value changes outside
method

https://fedorahosted.org/freeipa/ticket/5755
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/105/head:pr105
git checkout pr105
From 46a24ce9808c790f1f53ad7ebd9fe9c9a6418ed4 Mon Sep 17 00:00:00 2001
From: Martin Basti <mba...@redhat.com>
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
---
 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 fb4ab58..2598e0b 100644
--- a/ipatests/test_xmlrpc/test_cert_plugin.py
+++ b/ipatests/test_xmlrpc/test_cert_plugin.py
@@ -215,7 +215,9 @@ def test_0007_service_show(self):
         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):
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to