diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-05-19 22:20:17 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-05-19 22:20:17 +0000 |
commit | f9d0657e70e9511a2d7b4c63bbf06b138dd0be5e (patch) | |
tree | f4e0f665e77c37c368305fe2103f45628bd5b500 /tests/unit/utils.py | |
parent | 8ffc5c11ae6e246769a15104096873ed47d535a5 (diff) | |
parent | 450f505c35f8762cca29d56b6e928490288ec166 (diff) | |
download | python-swiftclient-f9d0657e70e9511a2d7b4c63bbf06b138dd0be5e.tar.gz |
Merge "Support client certificate/key"
Diffstat (limited to 'tests/unit/utils.py')
-rw-r--r-- | tests/unit/utils.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/unit/utils.py b/tests/unit/utils.py index 3b043bc..d04583f 100644 --- a/tests/unit/utils.py +++ b/tests/unit/utils.py @@ -57,6 +57,11 @@ def fake_get_auth_keystone(expected_os_options=None, exc=None, actual_kwargs['cacert'] is None: from swiftclient import client as c raise c.ClientException("unverified-certificate") + if auth_url.startswith("https") and \ + auth_url.endswith("client-certificate") and \ + not (actual_kwargs['cert'] and actual_kwargs['cert_key']): + from swiftclient import client as c + raise c.ClientException("noclient-certificate") return storage_url, token return fake_get_auth_keystone @@ -215,6 +220,7 @@ class MockHttpTest(unittest.TestCase): on_request = kwargs.get('on_request') def wrapper(url, proxy=None, cacert=None, insecure=False, + cert=None, cert_key=None, ssl_compression=True, timeout=None): if storage_url: self.assertEqual(storage_url, url) |