diff options
author | Jamie Lennox <jamielennox@redhat.com> | 2014-03-07 13:20:40 +1000 |
---|---|---|
committer | Jamie Lennox <jamielennox@redhat.com> | 2014-04-03 11:20:33 +1000 |
commit | d69461b18fcd05fdce63e98634cd6e7f102ff091 (patch) | |
tree | 7ba38dc061b75335459eddbc7d1f8811aed8ebd5 /keystoneclient/access.py | |
parent | b6cdfff5f8a0e0c808040d70be9cec2bba900033 (diff) | |
download | python-keystoneclient-d69461b18fcd05fdce63e98634cd6e7f102ff091.tar.gz |
Create a test token generator and use it
All the clients are currently storing samples of keystone tokens so that
they can use them in testing. This is bad as they are often out of date
or contain data that they shouldn't.
Create a V2 Token generator and make use of that for generating tokens
within our tests.
Change-Id: I72928692142c967d13391752ba57b3bdf7c1feab
blueprint: share-tokens
Diffstat (limited to 'keystoneclient/access.py')
-rw-r--r-- | keystoneclient/access.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/keystoneclient/access.py b/keystoneclient/access.py index 250d8ed..7120fd9 100644 --- a/keystoneclient/access.py +++ b/keystoneclient/access.py @@ -372,7 +372,7 @@ class AccessInfoV2(AccessInfo): @property def role_names(self): - return [r['name'] for r in self['user']['roles']] + return [r['name'] for r in self['user'].get('roles', [])] @property def domain_name(self): |