diff options
author | Jenkins <jenkins@review.openstack.org> | 2014-11-13 03:12:53 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2014-11-13 03:12:53 +0000 |
commit | f99e71da0fa80b2110887a9694512c2fcaddc191 (patch) | |
tree | 16c86261cdb2080b9535c97877857639b1447c8c /tests/unit/utils.py | |
parent | 19b427eacbbbb94199551766149472f26fa08698 (diff) | |
parent | 871a3e40f306f1bff056a86edcd644a82ab29c67 (diff) | |
download | python-swiftclient-f99e71da0fa80b2110887a9694512c2fcaddc191.tar.gz |
Merge "Fix KeyError raised from client Connection"
Diffstat (limited to 'tests/unit/utils.py')
-rw-r--r-- | tests/unit/utils.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/unit/utils.py b/tests/unit/utils.py index 09b31c1..c149abf 100644 --- a/tests/unit/utils.py +++ b/tests/unit/utils.py @@ -172,6 +172,7 @@ class MockHttpTest(testtools.TestCase): query_string = kwargs.get('query_string') storage_url = kwargs.get('storage_url') auth_token = kwargs.get('auth_token') + exc = kwargs.get('exc') def wrapper(url, proxy=None, cacert=None, insecure=False, ssl_compression=True): @@ -192,6 +193,8 @@ class MockHttpTest(testtools.TestCase): if url.endswith('invalid_cert') and not insecure: from swiftclient import client as c raise c.ClientException("invalid_certificate") + elif exc: + raise exc return conn.request = request |