Cleanup error message
MODIFY
test/with_dummyserver/test_https.py
test/with_dummyserver/test_https.py
@@ -212,8 +212,9 @@ class TestHTTPS(HTTPSDummyServerTestCase):
self.assertTrue('No root certificates specified' in str(e) or
'certificate verify failed' in str(e) or
'invalid certificate chain' in str(e),
- "Expected 'No root certificates specified' or "
- "'certificate verify failed', "
+ "Expected 'No root certificates specified', "
+ "'certificate verify failed', or "
+ "'invalid certificate chain', "
"instead got: %r" % e)
def test_no_ssl(self):

MODIFY
test/with_dummyserver/test_socketlevel.py
test/with_dummyserver/test_socketlevel.py
@@ -224,7 +224,10 @@ class TestClientCerts(SocketDummyServerTestCase):
done_receiving.set()
else:
done_receiving.set()
- self.fail("TLS handshake succeeded")
+ self.fail(
+ "Expected server to reject connection due to missing client "
+ "certificates"
+ )
class TestSocketClosing(SocketDummyServerTestCase):

Cleanup error message