summaryrefslogtreecommitdiff
path: root/glanceclient
diff options
context:
space:
mode:
authorDoug Hellmann <doug@doughellmann.com>2017-06-26 10:57:38 -0400
committerDoug Hellmann <doug@doughellmann.com>2017-06-26 10:59:29 -0400
commitc8a7a5d56de30cb596d21553f5dbf7ea3db866d8 (patch)
tree559e8d79773260e87cb58e1fb958951089a74c77 /glanceclient
parent392fa4f7c87568579689f2103693ec8b6db75a96 (diff)
downloadpython-glanceclient-c8a7a5d56de30cb596d21553f5dbf7ea3db866d8.tar.gz
allow unhandled exceptions to cause test errors
Hiding the unhandled exception in the test with a failure makes it harder to debug the problem. Let them pass unhandled so the test reports an ERROR instead of FAILURE. Change-Id: I4e435a6d276fdf161dac28f08c2c7efedd1d6385 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Diffstat (limited to 'glanceclient')
-rw-r--r--glanceclient/tests/unit/test_ssl.py16
1 files changed, 0 insertions, 16 deletions
diff --git a/glanceclient/tests/unit/test_ssl.py b/glanceclient/tests/unit/test_ssl.py
index 9bca2ec..323ac9d 100644
--- a/glanceclient/tests/unit/test_ssl.py
+++ b/glanceclient/tests/unit/test_ssl.py
@@ -93,8 +93,6 @@ class TestHTTPSVerifyCert(testtools.TestCase):
except exc.CommunicationError as e:
if 'certificate verify failed' not in e.message:
self.fail('No certificate failure message is received')
- except Exception:
- self.fail('Unexpected exception has been raised')
@mock.patch('sys.stderr')
def test_v1_requests_cert_verification_no_compression(self, __):
@@ -112,8 +110,6 @@ class TestHTTPSVerifyCert(testtools.TestCase):
except exc.CommunicationError as e:
if 'certificate verify failed' not in e.message:
self.fail('No certificate failure message is received')
- except Exception as e:
- self.fail('Unexpected exception has been raised')
@mock.patch('sys.stderr')
def test_v2_requests_cert_verification(self, __):
@@ -130,8 +126,6 @@ class TestHTTPSVerifyCert(testtools.TestCase):
except exc.CommunicationError as e:
if 'certificate verify failed' not in e.message:
self.fail('No certificate failure message is received')
- except Exception:
- self.fail('Unexpected exception has been raised')
@mock.patch('sys.stderr')
def test_v2_requests_cert_verification_no_compression(self, __):
@@ -149,8 +143,6 @@ class TestHTTPSVerifyCert(testtools.TestCase):
except exc.CommunicationError as e:
if 'certificate verify failed' not in e.message:
self.fail('No certificate failure message is received')
- except Exception as e:
- self.fail('Unexpected exception has been raised')
@mock.patch('sys.stderr')
def test_v2_requests_valid_cert_verification(self, __):
@@ -168,8 +160,6 @@ class TestHTTPSVerifyCert(testtools.TestCase):
except exc.CommunicationError as e:
if 'certificate verify failed' in e.message:
self.fail('Certificate failure message is received')
- except Exception as e:
- self.fail('Unexpected exception has been raised')
@mock.patch('sys.stderr')
def test_v2_requests_valid_cert_verification_no_compression(self, __):
@@ -187,8 +177,6 @@ class TestHTTPSVerifyCert(testtools.TestCase):
except exc.CommunicationError as e:
if 'certificate verify failed' in e.message:
self.fail('Certificate failure message is received')
- except Exception as e:
- self.fail('Unexpected exception has been raised')
@mock.patch('sys.stderr')
def test_v2_requests_valid_cert_no_key(self, __):
@@ -208,8 +196,6 @@ class TestHTTPSVerifyCert(testtools.TestCase):
except exc.CommunicationError as e:
if ('PEM lib' not in e.message):
self.fail('No appropriate failure message is received')
- except Exception as e:
- self.fail('Unexpected exception has been raised')
@mock.patch('sys.stderr')
def test_v2_requests_bad_cert(self, __):
@@ -235,8 +221,6 @@ class TestHTTPSVerifyCert(testtools.TestCase):
'PEM lib' not in e.message or
six.PY3 and 'PEM lib' not in e.message):
self.fail('No appropriate failure message is received')
- except Exception as e:
- self.fail('Unexpected exception has been raised')
@mock.patch('sys.stderr')
def test_v2_requests_bad_ca(self, __):