Small fix of adding role to the user
Made a small fix of adding role to the user: setting clear
variables. In the corner case when the 'admin' user is
not present, or it is has other username, or the domain is
different, the tests tried to find the only "admin" user in
the default domain only.
Also, there is a couple of minor fixes according to the PEP8
codestyle.
Related-PROD: PROD-36943
Change-Id: Ic891c4b54479adf85f88081d742cb7af45fc4639
diff --git a/utils/__init__.py b/utils/__init__.py
index 190dbd7..e4de308 100644
--- a/utils/__init__.py
+++ b/utils/__init__.py
@@ -10,11 +10,11 @@
def compile_pairs(nodes):
result = {}
- if len(nodes) %2 != 0:
+ if len(nodes) % 2 != 0:
nodes.pop(1)
pairs = list(zip(*[iter(nodes)] * 2))
for pair in pairs:
- result[pair[0]+'<>'+pair[1]] = pair
+ result[pair[0] + '<>' + pair[1]] = pair
return result