File tree 1 file changed +7
-3
lines changed
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):
1438
1438
await con .close ()
1439
1439
1440
1440
@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"
1442
1443
)
1443
1444
async def test_tls_version (self ):
1444
1445
if self .cluster .get_pg_version () < (12 , 0 ):
@@ -1455,12 +1456,15 @@ async def test_tls_version(self):
1455
1456
)
1456
1457
try :
1457
1458
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
+ ):
1459
1463
await self .connect (
1460
1464
dsn = 'postgresql://ssl_user@localhost/postgres'
1461
1465
'?sslmode=require&ssl_min_protocol_version=TLSv1.3'
1462
1466
)
1463
- with self .assertRaises (ssl .SSLError ):
1467
+ with self .assertRaises (( ssl .SSLError , ConnectionResetError ) ):
1464
1468
await self .connect (
1465
1469
dsn = 'postgresql://ssl_user@localhost/postgres'
1466
1470
'?sslmode=require'
You can’t perform that action at this time.
0 commit comments