summaryrefslogtreecommitdiff
path: root/functionaltests
diff options
context:
space:
mode:
authorClenimar Filemon <clenimar@lsd.ufcg.edu.br>2016-08-05 13:36:29 -0300
committerClenimar Filemon <clenimar@lsd.ufcg.edu.br>2016-09-13 13:01:30 +0000
commit091d823712f6c727971e01d4946fd63648580433 (patch)
treef27d1661f4d31fb3d91271ac52f68cbd97703eba /functionaltests
parent084ce7c0d2f6442b37bac05cb00977891e230128 (diff)
downloadpython-barbicanclient-091d823712f6c727971e01d4946fd63648580433.tar.gz
Cast sets to lists in acl functional tests
``acl_users`` can be either a set or a list. As long as Python sets are not JSON serializable, cast them to lists in functional tests. This way we avoid gate failures like [1]. [1] http://logs.openstack.org/46/319446/7/check/gate-python-barbicanclient-devstack-dsvm/cb80e0c/console.html#_2016-08-04_15_38_51_649177 Change-Id: I6b8601f7168120cf0e15716cc22b8834ddb127e8
Diffstat (limited to 'functionaltests')
-rw-r--r--functionaltests/client/v1/functional/test_acl.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/functionaltests/client/v1/functional/test_acl.py b/functionaltests/client/v1/functional/test_acl.py
index cdfcd0e..548929e 100644
--- a/functionaltests/client/v1/functional/test_acl.py
+++ b/functionaltests/client/v1/functional/test_acl.py
@@ -503,7 +503,8 @@ class ACLsTestCase(BaseACLsTestCase):
acl_users = server_acl.read.users
if acl_users and remove_users:
acl_users = set(acl_users).difference(remove_users)
- server_acl.read.users = acl_users
+ # Python sets are not JSON serializable. Cast acl_users to a list.
+ server_acl.read.users = list(acl_users)
if kwargs.get('remove_project_access') is not None:
server_acl.read.project_access = \
@@ -554,7 +555,8 @@ class ACLsTestCase(BaseACLsTestCase):
acl_users = server_acl.read.users
if acl_users and remove_users:
acl_users = set(acl_users).difference(remove_users)
- server_acl.read.users = acl_users
+ # Python sets are not JSON serializable. Cast acl_users to a list.
+ server_acl.read.users = list(acl_users)
if kwargs.get('remove_project_access') is not None:
server_acl.read.project_access = \