@@ -450,7 +450,7 @@ async def test_csot_timeout_message(self):
450450 with timeout (0.5 ):
451451 await client .db .t .find_one ({"$where" : delay (2 )})
452452
453- self .assertTrue ("(configured timeouts: timeoutMS: 500.0ms" in str (error .exception ))
453+ self .assertIn ("(configured timeouts: timeoutMS: 500.0ms" , str (error .exception ))
454454
455455 @async_client_context .require_failCommand_appName
456456 async def test_socket_timeout_message (self ):
@@ -475,9 +475,9 @@ async def test_socket_timeout_message(self):
475475 with self .assertRaises (Exception ) as error :
476476 await client .db .t .find_one ({"$where" : delay (2 )})
477477
478- self .assertTrue (
479- "(configured timeouts: socketTimeoutMS: 500.0ms, connectTimeoutMS: 20000.0ms)"
480- in str (error .exception )
478+ self .assertIn (
479+ "(configured timeouts: socketTimeoutMS: 500.0ms, connectTimeoutMS: 20000.0ms)" ,
480+ str (error .exception ),
481481 )
482482
483483 @async_client_context .require_failCommand_appName
@@ -507,9 +507,9 @@ async def test_connection_timeout_message(self):
507507 with self .assertRaises (Exception ) as error :
508508 await client .admin .command ("ping" )
509509
510- self .assertTrue (
511- "(configured timeouts: socketTimeoutMS: 500.0ms, connectTimeoutMS: 500.0ms)"
512- in str (error .exception )
510+ self .assertIn (
511+ "(configured timeouts: socketTimeoutMS: 500.0ms, connectTimeoutMS: 500.0ms)" ,
512+ str (error .exception ),
513513 )
514514
515515
0 commit comments