diff options
| author | Navid Pustchi <npustchi@gmail.com> | 2016-02-04 16:45:38 +0000 |
|---|---|---|
| committer | Alvaro Lopez Garcia <aloga@ifca.unican.es> | 2016-06-09 18:00:40 +0200 |
| commit | 6ae0d2e8a54fd5139e63a990ab4bdce634e73c5e (patch) | |
| tree | 5833e88147e71524b49a5b25979fd17869dd455c /openstackclient/tests/fakes.py | |
| parent | ada6abb30e6b1c49229817ae53ab96d88c50fd21 (diff) | |
| download | python-openstackclient-6ae0d2e8a54fd5139e63a990ab4bdce634e73c5e.tar.gz | |
Moving authentication from keystoneclient to keystoneauth
Currently OpenStackClient uses keystoneclient for authentication.
This change will update OpenStackClient to use keystoneauth for
authentication.
All dependant test have been updated.
Updating how auth_ref is set in the tests to use KSA fixtures had
some racy side-effects. The user_role_list tests failed when they
picked up an auth_ref that was a fixture. This exposed a weakness
in ListUserRole that needed to be fixed at the same time re
handling of unscoped tokens and options.
Change-Id: I4ddb2dbbb3bf2ab37494468eaf65cef9213a6e00
Closes-Bug: 1533369
Diffstat (limited to 'openstackclient/tests/fakes.py')
| -rw-r--r-- | openstackclient/tests/fakes.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/openstackclient/tests/fakes.py b/openstackclient/tests/fakes.py index ad4705a4..d0cab019 100644 --- a/openstackclient/tests/fakes.py +++ b/openstackclient/tests/fakes.py @@ -50,6 +50,21 @@ TEST_RESPONSE_DICT_V3.set_project_scope() TEST_VERSIONS = fixture.DiscoveryList(href=AUTH_URL) +def to_unicode_dict(catalog_dict): + """Converts dict to unicode dict + + """ + if isinstance(catalog_dict, dict): + return {to_unicode_dict(key): to_unicode_dict(value) + for key, value in catalog_dict.items()} + elif isinstance(catalog_dict, list): + return [to_unicode_dict(element) for element in catalog_dict] + elif isinstance(catalog_dict, str): + return catalog_dict + u"" + else: + return catalog_dict + + class FakeStdout(object): def __init__(self): |
