summaryrefslogtreecommitdiff
path: root/tests/unit/utils.py
diff options
context:
space:
mode:
authorClay Gerrard <clay.gerrard@gmail.com>2014-04-08 21:14:13 -0700
committerTim Burke <tim.burke@gmail.com>2015-06-15 12:38:21 -0700
commit17feec709c02612c285ebddaf712876b619aa5ed (patch)
treeaa3b468cff83a9b40f520c5fad8f6659ce8ad1ff /tests/unit/utils.py
parentec3e2ab3a099b1276ae5d87fda936567f64423dc (diff)
downloadpython-swiftclient-17feec709c02612c285ebddaf712876b619aa5ed.tar.gz
Add some bash helpers for auth stuff
Change-Id: If61ac9a050e7a115f37dbf4e74b904ac5dfd2052
Diffstat (limited to 'tests/unit/utils.py')
-rw-r--r--tests/unit/utils.py6
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):