Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c7b05a4

Browse files
committed
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.
1 parent 3f2240c commit c7b05a4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/test/test_asyncio/test_events.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ def test_create_server_ssl_verify_failed(self):
999999
with mock.patch.object(self.loop, 'call_exception_handler'):
10001000
with test_utils.disable_logger():
10011001
with self.assertRaisesRegex(ssl.SSLError,
1002-
'certificate verify failed '):
1002+
'(?i)certificate.verify.failed '):
10031003
self.loop.run_until_complete(f_c)
10041004

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

10391039
# execute the loop to log the connection error

0 commit comments

Comments
 (0)