Make the error message regex more lenient so that it matches both

"certificate verify failed " and "CERTIFICATE_VERIFY_FAILED " as
some SSL libraries use different text than OpenSSL.
This commit is contained in:
Gregory P. Smith 2016-01-15 17:30:24 -08:00
commit a3a58331a5
1 changed files with 2 additions and 2 deletions

View File

@ -999,7 +999,7 @@ def test_create_server_ssl_verify_failed(self):
with mock.patch.object(self.loop, 'call_exception_handler'):
with test_utils.disable_logger():
with self.assertRaisesRegex(ssl.SSLError,
'certificate verify failed '):
'(?i)certificate.verify.failed '):
self.loop.run_until_complete(f_c)
# execute the loop to log the connection error
@ -1033,7 +1033,7 @@ def test_create_unix_server_ssl_verify_failed(self):
with mock.patch.object(self.loop, 'call_exception_handler'):
with test_utils.disable_logger():
with self.assertRaisesRegex(ssl.SSLError,
'certificate verify failed '):
'(?i)certificate.verify.failed '):
self.loop.run_until_complete(f_c)
# execute the loop to log the connection error