@@ -824,11 +824,9 @@ async def test_init_disconnected(self):
824824 c = await self .async_rs_or_single_client (connect = False )
825825 self .assertEqual (c .codec_options , CodecOptions ())
826826 c = await self .async_rs_or_single_client (connect = False )
827- await c .aconnect ()
828827 self .assertFalse (await c .primary )
829828 self .assertFalse (await c .secondaries )
830829 c = await self .async_rs_or_single_client (connect = False )
831- await c .aconnect ()
832830 self .assertIsInstance (c .topology_description , TopologyDescription )
833831 self .assertEqual (c .topology_description , c ._topology ._description )
834832 if async_client_context .is_rs :
@@ -860,17 +858,13 @@ async def test_equality(self):
860858 self .assertTrue (async_client_context .client != c )
861859
862860 c1 = self .simple_client ("a" , connect = False )
863- await c1 .aconnect ()
864861 c2 = self .simple_client ("b" , connect = False )
865- await c2 .aconnect ()
866862
867863 # Seeds differ:
868864 self .assertNotEqual (c1 , c2 )
869865
870866 c1 = self .simple_client (["a" , "b" , "c" ], connect = False )
871- await c1 .aconnect ()
872867 c2 = self .simple_client (["c" , "a" , "b" ], connect = False )
873- await c2 .aconnect ()
874868
875869 # Same seeds but out of order still compares equal:
876870 self .assertEqual (c1 , c2 )
@@ -910,9 +904,7 @@ async def test_repr(self):
910904 self .assertIn ("replicaset='replset'" , the_repr )
911905 self .assertIn ("w=1" , the_repr )
912906 self .assertIn ("wtimeoutms=100" , the_repr )
913- await client .close ()
914907 async with eval (the_repr ) as client_two :
915- await client_two .aconnect ()
916908 self .assertEqual (client_two , client )
917909
918910 client = self .simple_client (
@@ -934,7 +926,6 @@ async def test_repr(self):
934926 self .assertIn ("wtimeoutms=100" , the_repr )
935927
936928 async with eval (the_repr ) as client_two :
937- await client_two .aconnect ()
938929 self .assertEqual (client_two , client )
939930
940931 async def test_getters (self ):
0 commit comments