diff options
author | Jenkins <jenkins@review.openstack.org> | 2015-07-11 06:41:45 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2015-07-11 06:41:45 +0000 |
commit | 605ec9250791453d0cf449b591bfc11a2a0b04fb (patch) | |
tree | d1ad31b5f8b5f1461811d61f14ac859841ceac42 /tests/unit/utils.py | |
parent | 0b592caabfd9acd9838a843a56edd526270c4f65 (diff) | |
parent | 17feec709c02612c285ebddaf712876b619aa5ed (diff) | |
download | python-swiftclient-605ec9250791453d0cf449b591bfc11a2a0b04fb.tar.gz |
Merge "Add some bash helpers for auth stuff"
Diffstat (limited to 'tests/unit/utils.py')
-rw-r--r-- | tests/unit/utils.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/unit/utils.py b/tests/unit/utils.py index 955296e..0a45437 100644 --- a/tests/unit/utils.py +++ b/tests/unit/utils.py @@ -38,8 +38,10 @@ def fake_get_auth_keystone(expected_os_options=None, exc=None, if exc: raise exc('test') # TODO: some way to require auth_url, user and key? - if expected_os_options and actual_os_options != expected_os_options: - return "", None + if expected_os_options: + for key, value in actual_os_options.items(): + if value and value != expected_os_options.get(key): + return "", None if 'required_kwargs' in kwargs: for k, v in kwargs['required_kwargs'].items(): if v != actual_kwargs.get(k): |