diff options
Diffstat (limited to 'neutron/tests/functional/pecan_wsgi/test_functional.py')
-rw-r--r-- | neutron/tests/functional/pecan_wsgi/test_functional.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/neutron/tests/functional/pecan_wsgi/test_functional.py b/neutron/tests/functional/pecan_wsgi/test_functional.py index f5b5c7eb33..4698acf201 100644 --- a/neutron/tests/functional/pecan_wsgi/test_functional.py +++ b/neutron/tests/functional/pecan_wsgi/test_functional.py @@ -43,8 +43,11 @@ class InjectContext(base.ConfigurableMiddleware): # Determine the tenant tenant_id = req.headers.get('X_PROJECT_ID') - # Suck out the roles - roles = [r.strip() for r in req.headers.get('X_ROLES', '').split(',')] + roles = ['member', 'reader'] + # Suck out the roles if any are set + custom_roles = req.headers.get('X_ROLES') + if custom_roles: + roles = [r.strip() for r in custom_roles.split(',')] # Human-friendly names tenant_name = req.headers.get('X_PROJECT_NAME') |