File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -815,11 +815,17 @@ async def test_ssl_connection_custom_context(self):
815815 await con .close ()
816816
817817 async def test_ssl_connection_default_context (self ):
818- with self .assertRaisesRegex (ssl .SSLError , 'verify failed' ):
819- await self .connect (
820- host = 'localhost' ,
821- user = 'ssl_user' ,
822- ssl = True )
818+ # XXX: uvloop artifact
819+ old_handler = self .loop .get_exception_handler ()
820+ try :
821+ self .loop .set_exception_handler (lambda * args : None )
822+ with self .assertRaisesRegex (ssl .SSLError , 'verify failed' ):
823+ await self .connect (
824+ host = 'localhost' ,
825+ user = 'ssl_user' ,
826+ ssl = True )
827+ finally :
828+ self .loop .set_exception_handler (old_handler )
823829
824830 async def test_ssl_connection_pool (self ):
825831 ssl_context = ssl .SSLContext (ssl .PROTOCOL_SSLv23 )
You can’t perform that action at this time.
0 commit comments