From 17feec709c02612c285ebddaf712876b619aa5ed Mon Sep 17 00:00:00 2001 From: Clay Gerrard Date: Tue, 8 Apr 2014 21:14:13 -0700 Subject: Add some bash helpers for auth stuff Change-Id: If61ac9a050e7a115f37dbf4e74b904ac5dfd2052 --- tests/unit/utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/unit/utils.py') 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): -- cgit v1.2.1