File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1438,7 +1438,8 @@ async def test_executemany_uvloop_ssl_issue_700(self):
14381438 await con .close ()
14391439
14401440 @unittest .skipIf (
1441- sys .version_info < (3 , 7 ), "Python < 3.7 doesn't have ssl.TLSVersion"
1441+ sys .version_info < (3 , 7 ),
1442+ "Python < 3.7 doesn't have ssl.TLSVersion"
14421443 )
14431444 async def test_tls_version (self ):
14441445 if self .cluster .get_pg_version () < (12 , 0 ):
@@ -1455,12 +1456,15 @@ async def test_tls_version(self):
14551456 )
14561457 try :
14571458 self .loop .set_exception_handler (lambda * args : None )
1458- with self .assertRaisesRegex (ssl .SSLError , 'protocol version' ):
1459+ with self .assertRaisesRegex (
1460+ ssl .SSLError ,
1461+ '(protocol version)|(handshake failure)' ,
1462+ ):
14591463 await self .connect (
14601464 dsn = 'postgresql://ssl_user@localhost/postgres'
14611465 '?sslmode=require&ssl_min_protocol_version=TLSv1.3'
14621466 )
1463- with self .assertRaises (ssl .SSLError ):
1467+ with self .assertRaises (( ssl .SSLError , ConnectionResetError ) ):
14641468 await self .connect (
14651469 dsn = 'postgresql://ssl_user@localhost/postgres'
14661470 '?sslmode=require'
You can’t perform that action at this time.
0 commit comments